EOF error: EOF when reading line' | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula gr√°tis
+ 1

EOF error: EOF when reading line'

My code doesn't go back to the input command after the first guess and give me the title as an Error message https://sololearn.com/compiler-playground/cZr0KuVo8hLh/?ref=app

22nd May 2024, 3:10 PM
Ahmed Hamza
Ahmed Hamza - avatar
4 Respostas
+ 3
Here is one example of a way to get multiple inputs using the Sololearn compiler: https://sololearn.com/compiler-playground/cvTdHZl4gpl1/?ref=app More advanced method for getting multiple inputs: https://sololearn.com/compiler-playground/ckn3jO4yuPJq/?ref=app but as Wilbur Jaywright already pointed out, the Sololearn compiler is limited and this is by design.
22nd May 2024, 4:02 PM
Keith - avatar
+ 2
Well, guessTheNumber is not possible on SL. How about a little variation: Your program has to guess the correct number in max five steps. Code the correct next guess depending on Wether the guess is to high or to low.
24th May 2024, 6:07 AM
Oma Falk
Oma Falk - avatar
+ 1
Sololearn’s Python sandbox is rather limited, and requires that you provide all the inputs at the beginning of the program, unlike regular Python. This program is valid Python code and would work in a normal Python interpreter, but it will not work in the Sololearn sandbox.
22nd May 2024, 7:36 PM
Wilbur Jaywright
Wilbur Jaywright - avatar
Keith On one hand, that doesn’t really fix the problem of how to make multiple guesses, as each one needs to give feedback. On the other hand, you have pointed out that the problem is being unable to make multiple guesses within Sololearn’s sandbox.
22nd May 2024, 7:35 PM
Wilbur Jaywright
Wilbur Jaywright - avatar