0
Problem with Continue in Python
Ticket calculating and below 3 years children are free and above 3 years are taking tickets $100 for each ticket this code gives an error total = 0 i = 0 while i < 5: age = int(input()) i = i+1 if age < 3: continue total +=100 print(total)
5 Answers
+ 2
Make sure to use the same amount of whitespace along your while block, so your code is properly aligned. Your last two lines seem to be misaligned.
0
What's the correct align
0
you can align the code through online code beautifier
0
i = 0
While (i < 100):
Age = int(input(": "))
If age <= 3:
Print (f"puedes ir gratis")
Continué
Elif age > 5:
Print(f"elige una edad hasta los 5 años")
Continue
Elif i == 100:
Break
Else:
Print (f"pagas tu ticket a 100quot;)
i = i + 1
Print (f"fin de la venta, total {i} boletos")