384,145 views
11 votes
11 votes
!!!!!!!!!!!!!!PLEASE ANSWER THIS!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!I WILL GIVE 15 POINTS!!!!!!!!!!!!!!!

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

User Olokoo
by
3.2k points

1 Answer

22 votes
22 votes

Answer:

age = int(input())

ticket = 100

total = 0

passengers = 1

while passengers <= 5:

if age < 3:

continue

else:

total += ticket

passengers += 1

print(total)

Explanation:

UuU

User Aleika
by
2.7k points