5th Jun 2022, 2:25 PM
Varshith Krishna
Varshith Krishna - avatar
3 odpowiedzi
0
For the shorter version of Jayakrishna🇮🇳 's answer, which I think you are trying to do, x += 1 //Missing the equal sign. Also, be careful with your indentation. Indentation is a part of syntax in Python and won't work if you don't do so properly.
5th Jun 2022, 2:29 PM
Justice
Justice - avatar
+ 2
x = x + 1 edit: also may you need >= 3 instead of >3 !
5th Jun 2022, 2:28 PM
Jayakrishna 🇮🇳
0
total = 0 x=0 age =int(input()) while x<5: if age>3: total +=100 x=x+1 print(total)
5th Jun 2022, 5:53 PM
Mihir Lalwani
Mihir Lalwani - avatar