0

how to fix EOF error in python?

how do i fix an EOF error in python? https://code.sololearn.com/cO98UB8vkZW0

26th Apr 2022, 4:43 PM
Decode
Decode - avatar
4 Respostas
+ 1
EOF errors often occur when your program expects an input (wants to read an input) but does not find one. On sololearn you have to enter all input at the beginning. And you are using while True without any break statements. Means, you would need to enter infinity times: rock, paper or scissor to avoid eof error. So I suggest you just let the program end when the user or the bot wins the game.
28th Apr 2022, 3:02 PM
Denise Roßberg
Denise Roßberg - avatar
+ 5
Hello Decode Please show us your code so that we can help you.
27th Apr 2022, 4:19 PM
Denise Roßberg
Denise Roßberg - avatar
28th Apr 2022, 2:53 PM
Decode
Decode - avatar
0
text = input() word = input() def search(text, word): text = str.split(' ') for words in text: if word == words: print("Word found") else: print("Word not found") print(search(text, word))
4th May 2023, 5:40 AM
Emanuel Higa
Emanuel Higa - avatar