+ 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?
11 ответов
+ 5
Your code requires six inputs. If I remember correctly sololearn only provides five for this exercise. That's what causes the EOF error.
+ 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)
+ 6
I have checked it problem in sololearn compiler.it has bug. use your interpretor please
+ 4
Which python version you are using
+ 4
Let me try here also.
+ 4
Also like my all answer please
+ 2
The sololearn app
+ 1
Can't get app to run it. Get an EOF error to line 5.
+ 1
Tks!
+ 1
Tks, that solve it!
+ 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 .