0
Eoferror
total = 0 i = 0 while i <=5: i += 1 age = int(input("insert age here")) if age < 3: continue else: total += 100 print(total) Getting EOFerror on line 5 can't work out why Exercise is to work out total price of tickets at $100 each but kids under 3 are free so need to continue rather than add for inputs lower than 3
2 Answers
+ 4
Your code requires six inputs. If there are less this happens.
0
Changed the 5 in line 3 to a 4 and it worked. Looking back i could have also changed initial I value to 1 I think