+ 1
Introduction to Phyon?
hello, im a newbie here, I tried to solve this code coach problem but my output is not correct, kindly correct my code and explain it to me. Task : 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 I have answered correctly but still not by the results of test cases 1 to 4. https://www.sololearn.com/compiler-playground/c541AZbD669W
3 Respostas
+ 2
Tio Dominggus Sihotang ,
if you try to solve this code coach exercise, you have to follow the task description.
the input is requested as 5 individual inputs, that have to be taken in a loop. what you have done is to use a list with these 5 inputs. this is not what code coach is expecting, so the test cases will fail.
+ 1
Thanks a lot
0
The link doesn't open !!
But you can take a look of my code
https://code.sololearn.com/cFxl2Tf1mnPe/?ref=app