Can u tell me why my version doesn't work but the second one works?
Task is: continue You are making a ticketing system. The price of a single ticket is $100. For children under 3 years old, the ticket is free. Your program needs to take the ages of 5 passengers as input and output the total price for their tickets. Sample Input 18 24 2 5 42 Sample Output 400 My try that doesn't work is: ticket = 100 total = 0 passengers = 5 while passengers >= 0: age = int(input()) passengers -= 1 if age < 3: continue else: total += ticket print(total) this one works, but why? ticket = 100 total = 0 passengers = 1 while passengers <= 5: age = int(input()) passengers += 1 if age < 3: continue else: total += ticket print(total) I already noticed that I can cut out the else part in the working one to this code: ticket = 100 total = 0 passengers = 1 while passengers <= 5: age = int(input()) passengers += 1 if age > 3: total += ticket print(total)