0

Why this code is not working?

I think there is no error but... https://code.sololearn.com/cIWcszfYzr20/?ref=app

28th May 2020, 5:55 PM
MrA
10 Respostas
+ 2
Well, you were supposed to indent the if statement so that it is within the 'while' https://code.sololearn.com/c8GyMUC61Stm/#py code block. But also after fixing that, I got an EOF error. You can read more about it but basically since you are in the code playground and the program accepts input only once on running the code. You do not get the chance to input the second time and so on. Hence the program doesn't get any input thus getting the EOF (End of File)
28th May 2020, 6:39 PM
Morse
Morse - avatar
+ 1
In all the lines, use Tab to place the indentation, in all of them some spaces are missing. Although on Pydroid it only showed me an indentation error on line 10.
28th May 2020, 6:42 PM
Josshual A. Toro M.
Josshual A. Toro M. - avatar
+ 1
Amos for use in SoloLearn you can Enter first value and press button intro, Later you can input multiple lines for example : 1 2 3 n.... For the lines what you need.
28th May 2020, 7:23 PM
Josshual A. Toro M.
Josshual A. Toro M. - avatar
0
You had a space more in the if. Remenber what are four spaces for identation. I repair your code, check. https://code.sololearn.com/cCkF4lx9YqLE/?ref=app
28th May 2020, 6:04 PM
Josshual A. Toro M.
Josshual A. Toro M. - avatar
0
In which line? Josshual A. Toro M.
28th May 2020, 6:11 PM
MrA
0
Ok thanks Josshual A. Toro M. But I am working with mobile)
28th May 2020, 6:43 PM
MrA
0
Josshaul A. Toro M, it works well in pydroid since you get the console for input but when you run it in the code play ground, it doesn't since you get to input only once.
28th May 2020, 6:46 PM
Morse
Morse - avatar
0
MrA you can download Pydroid from the play store and your code will work fine.
28th May 2020, 7:14 PM
Morse
Morse - avatar
0
Sorry, but I didn't get you quite well there.
28th May 2020, 7:30 PM
Morse
Morse - avatar
0
The one who feels it is me, English is not my first language. You will have to execute a code in SoloLearn that you will need multiple entries, you must enter the entry and receive to write on another line. For example, the code for this thread. You must write: add - -> first option divide - -> second option quit - -> third option In lines separate.
28th May 2020, 7:46 PM
Josshual A. Toro M.
Josshual A. Toro M. - avatar