0
Can someone please help? EOF error
So the problem has to do with multiple inputs, and how sololearn reads them. Except nobody has explained it to me properly, except for "Specify both the inputs when it is asked for, on separate lines" Except that to me could mean a multitude of things. Could someone please explain that to me, clearly, as if I was five? https://code.sololearn.com/cWw00sDAG35S/?ref=app
5 odpowiedzi
+ 4
One more time:
Sololearn playground is limited by the fact that code are processed on server side (appart the special case of web projects) so script is sent to sololearn servers with once string user inputed wich will be used as a virtual input stream when (distant) running the script... so user is asked to input all required input by the code execution at once (line breaks used to separate each of them) and avoiding real in/output interativity and/or real-time display (in a similar ways as input, output is collected on server side during the code execution, and is sent back to user side after the script end).
Web projects are a little bit different in in/output treatment, as by design, the code is processed on user side... but unfortunaly, the code is still (uselessly) send to server before be loaded in the playground viewer, so realtime in/ouput interactivity is still possible.
The key is not so much in a "compiler" question (Python is not compiled, but interpreted), but in the ability to run the script locally... in my point of view, that's not an enough reason to jump to another language, but a reason to less success of sharing other than web code. But almost, "running codes through a different COMPILER" is not the good answer: you need to use/install a local interpreter (linux have generally one preinstalled, I guess macOS too, but windows need to install one, and android -- and potentially iOS -- have app able to run Python script -- I personnally use QPython on android)...
+ 1
Jeb, each input is in a line so if you have 3 input for example, then you must to write in input box
input 1
input 2
input 3
+ 1
Nothing, you only need to run in computer compiler or maybe search another option. In Javascript for example you can use prompt instruction to get user input in any time and not all at the begining. I dont know if in python exist some other way in this moment
+ 1
Excellent, alright. Ill start running codes through a different compiler, thank you.
0
So what am I supposed to change in mine?