+ 1
I'm stuck on a Loops practice question.
You are making a ticketing system. The price of a single ticket is $100. For children under 3 yea total = 0 passenger_agelist = [18,24,2,5,42] for age in passenger_agelist: if age < 3: continue total += 100 print(total) This is the code I wrote and it fails the other tests. I don't know what's wrong with it.
1 Answer
+ 6
Atem-Ebai Fritzjarvis you have hard-coded the list of sample test values. Instead the program needs to get the values from the console by using the input() function. Code Coach runs several tests and provides different inputs for each test through console input.