+ 3

Practice 24.2

Im getting an error on this code: total = 0 pasn = 0 while pasn < 6: pasn = pasn + 1 age = int(input()) if age < 3: continue total = total+100 print (total) It says that there is an error reading line 5 "age = int(input())". Can't figure it out. Can someone help?

3rd Feb 2022, 12:08 AM
gaston satizabal
11 Answers
+ 5
Your code requires six inputs. If I remember correctly sololearn only provides five for this exercise. That's what causes the EOF error.
3rd Feb 2022, 12:57 AM
Simon Sauter
Simon Sauter - avatar
+ 6
It works 100% in Interpretor. total = 0 pasn = 0 while pasn < 6: pasn = pasn + 1 age = int(input()) if age < 3: continue total = total+100 print(total)
3rd Feb 2022, 12:29 AM
Abu Habban
Abu Habban - avatar
+ 6
I have checked it problem in sololearn compiler.it has bug. use your interpretor please
3rd Feb 2022, 12:39 AM
Abu Habban
Abu Habban - avatar
+ 4
Which python version you are using
3rd Feb 2022, 12:33 AM
Abu Habban
Abu Habban - avatar
+ 4
Let me try here also.
3rd Feb 2022, 12:34 AM
Abu Habban
Abu Habban - avatar
+ 4
Also like my all answer please
3rd Feb 2022, 12:40 AM
Abu Habban
Abu Habban - avatar
+ 2
The sololearn app
3rd Feb 2022, 12:34 AM
gaston satizabal
+ 1
Can't get app to run it. Get an EOF error to line 5.
3rd Feb 2022, 12:33 AM
gaston satizabal
+ 1
Tks!
3rd Feb 2022, 12:39 AM
gaston satizabal
+ 1
Tks, that solve it!
3rd Feb 2022, 12:59 AM
gaston satizabal
+ 1
gaston satizabal Here is correct solution. total = 0 passenger = 0 while passenger < 5: age = int(input()) passenger += 1 if age >= 3: total += 100 else: continue print(total) I hope you helpful it .
4th Feb 2022, 6:22 PM
Abdulatif Mohamednor Mohamed
Abdulatif Mohamednor Mohamed - avatar