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
4 Respuestas
+ 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.
+ 1
you have to also print the total amount. (at last)
edit your code and post it here
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)
0
I fixed it