+ 1
Python error
Why I'm receiving this error: ================================= Traceback (most recent call last): File "..\Playground\", line 8, in <module> b = input () EOFError: EOF when reading a line ================================= for this code: ================================= a = input() if a == 0: print (a) else: b = input () print (b) =================================
5 Answers
+ 2
Doru, when you run it on SoloLearn, don't forget to put in both of your inputs and not just one. ;) Separate the inputs with a new line.
+ 2
a = input("")
if a == 0:
print (a)
else:
b = input ("")
print (b)
+ 1
correct synatax input("")
+ 1
I have the same error with input() or input("")
a = input("")
if a == 0:
print (a)
else:
b = input("")
print (b)
=========================================
Traceback (most recent call last):
File "..\Playground\", line 6, in <module>
b = input("")
EOFError: EOF when reading a line
=========================================
a = input()
if a == 0:
print (a)
else:
b = input()
print (b)
=============================
Traceback (most recent call last):
File "..\Playground\", line 6, in <module>
b = input()
EOFError: EOF when reading a line
0
fix the both inputs to input() and prints to print(a) and print(b)