+ 1

Would like to solve this Coad Coach Task

Ticketing System 5 Passengers Age 24, 18, 2, 5 and 42 Single ticket price $100 For children under 3 years the ticket is for free The output should be the total value of $400 total = 0 i = 0 while i < 5: age = int(input()) i = i + 1 if age < 3: continue total += 100 print(total) It doesn't work. What do I not understand? Please could you help me? Thanks in advance

13th Nov 2022, 11:36 AM
Claudius Paprotny
Claudius Paprotny - avatar
5 Answers
+ 6
Claudius Paprotny , the code is running properly in the related exercise. if you have still have trouble, check if there may be an unwanted text...
13th Nov 2022, 12:01 PM
Lothar
Lothar - avatar
+ 2
Check again.. It should work.. đŸ€”
13th Nov 2022, 11:46 AM
Jayakrishna 🇼🇳
+ 2
Okay, suddenly it worked out. Thank you very much for your quick response! Much appreciated😊👍 It's great, love that.
13th Nov 2022, 12:13 PM
Claudius Paprotny
Claudius Paprotny - avatar
+ 1
Task name ? i don't find any ticketing system under code coach tab
13th Nov 2022, 11:40 AM
Ratnapal Shende
Ratnapal Shende - avatar
+ 1
The coad coach practice exercise is called Ticket Prices I think. It's about the continue function.
13th Nov 2022, 11:44 AM
Claudius Paprotny
Claudius Paprotny - avatar