0
Break/break
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
4 Réponses
+ 5
Mastermind Avoid duplication
https://www.sololearn.com/Discuss/2970930/?ref=app
+ 4
Where is your try Mastermind ?
+ 3
total = 0
i = 0
while i < 5:
i = i + 1
age = int(input())
If age > 2:
total = total + 100
else:
continue
print(total)
And this seems to be working.
******************************
I don't know how to tag my codes that's why I wrote them straight here.🙈
+ 1
Mastermind to put a code into a post/reply/wherever click/tap on the little code button {} and then click/tap the plus button +, choose your language, write away and save. When you are replying/posting etc there is usually another button to add your saved code.