Eoferror: Eof When Reading A Line

Eof When Reading A Line

Eoferror: Eof When Reading A Line. Eof when reading a line. Syntax error, no input, or infinite “while” loop.

Eof When Reading A Line
Eof When Reading A Line

2 the value you're setting for t is 5, which means the while loop will run 6 times, but you're only providing 5 integers. But its giving me the above error. Web 4 answers sorted by: Share improve this answer follow File file.py, line 3, in n=input (enter a value) eoferror: Web basically, i have to check whether a particular pattern appear in a line or not. Most likely your raw_input failed. Eof when reading a line error message occurs for multiple reasons, such as: So here is my code: I wrote this function to find the index of the last max number in the list.

Syntax error, no input, or infinite “while” loop. But it returns following error eoferror: But its giving me the above error. Return ( (width + height)*2) print (rectangleperimeter (width, height)) except eoferror as. Web 1 answer sorted by: Here is your fixed code: 2 the value you're setting for t is 5, which means the while loop will run 6 times, but you're only providing 5 integers. Share improve this answer follow So here is my code: When can we expect eoferror we can expect eof in few cases which have to deal with input() / raw_input() such as: P = input () while 1: