0
break and continue
You are making a ticketing system. The price of a single ticket is $100. For children under 3 years of age, 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 ### Itās been a week, I donāt get it????
11 Answers
+ 1
Nathanael
So within 1 week what you have written, can you show?
0
So my plan was to take in some data and make a list from that and then loop through the list and and add 100$ for every age but jump when age is < 3.
0
I have sent you link, but here is one too,
https://sololearn.com/coach/1759/?ref=app
0
total = 0
#your code goes here
in_put = input("Input your age; ").split()
for age in in_put:
total += 100
if age < 3:
continue
print(total)