problem with the ticketing code in beginner Python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

problem with the ticketing code in beginner Python

I have written a program that works in test case 1 & 2 but I am left stuck and it is not accepted. I try to look at the solution but that leaves me "hanging".

14th Jan 2022, 3:14 AM
Peter Grey
2 Answers
+ 4
Your output should be same as expected output. print(total)
14th Jan 2022, 3:52 AM
Simba
Simba - avatar
0
I just realised I should have sent that. Sorry. Here it is total = 0 passengers=5 while passengers>0: age = input() if int(age)>=3: total=total+100 passengers=passengers-1 print("
quot;+str(total)) Thanks Peter
14th Jan 2022, 3:31 AM
Peter Grey