0

Lesson problem

There’s a lesson in python for beginners and my code isn’t working help please That’s the code help please total = 0 t = 100 p = 0 while(p<5): age = int(input() p+=1 if age>3: total+=t else: continue

21st Feb 2022, 9:40 AM
Susu Ice cream
4 Respostas
+ 1
You're missing a closing curly brace for the int() function and your indentation is off. Formatting is important in python, even if you're just trying to share your code and it's a typo, because it will cause an error. This is why it is usually best to copy your code to the SL playground and share a link to the code in your post.
21st Feb 2022, 9:52 AM
ChaoticDawg
ChaoticDawg - avatar
+ 1
you have to also print the total amount. (at last) edit your code and post it here
21st Feb 2022, 9:56 AM
NEZ
NEZ - avatar
0
Here’s the indented one total = 0 p = 0 t = 100 while p < 5: age = input() if age < 3: continue else: total += t print(total)
21st Feb 2022, 10:27 AM
Susu Ice cream
0
I fixed it
21st Feb 2022, 10:41 AM
Susu Ice cream