0
Cannot produce prompt question on Chromebook?
I am learning Python and in the "Taking user input" lesson I typed code to add a question to the user input prompt. However, all I keep on getting is the message "Seems like your program requires an input". The question does never pop-up. What can be the cause? I am working from a Chromebook, on the SoloLearn website. This is the code: name = input("Enter your name: ") print("Hello, " + name)
8 Respostas
0
Type anything and the code will display the result.
If it isn't, is it a bug?
0
that's the way code playground works at sololearn: all input are taken at once before running script (but after clicking 'run'), because codes are executed on server side... so all inputs are collected, then send with script to server, where output is collected and finally returned to be displayed ^^
0
Thanks guys for responding, Not sure I understand here. I need to be more clear probably. I am dloing the Python course on a chromebook. Online. So the website then says: "try yourself". So I am using the online IDE on sololearn (if thats the correct word for it).
I haven't installed any IDE yet (and prefer not to unless it is easy and doesn't slow down the chromebook since it's my boyfriend's)
See here for the screenshots:
https://snipboard.io/lBTP9o.jpg
https://snipboard.io/JbS8s7.jpg
Thanks!
0
yes: you run script in sololearn code playground, so that's it ;)
0
Thanks Visph. I am a total n00b so I assume you mean that something happens on the way to the server that is causing my question prompt to not appear on my screen? I have no idea what this means for other coding.
Would the same happen on a Windows computer without a Python installation? Or is it purely a chromebook related problem? I am trying to understand everything.
0
yes, the device where you run sololearn code playground (app or website) will produce the same popup...
in fact, the script is basically parsed to search for 'input' inside it, and popup occurs even if 'input' is found in comments ;P
only web languages (html/css/js and php) are run on client side... meaning with real user interactivity ^^
0
So trying the code on replit wouldn't solve my issue then?
0
I don't know: I'm talking about sololearn code playground...
if replit handle scripts as sololearn, you must have some way to get inputs just before running them (but after clicking the 'run' -- or equivalent -- button), else it will allow for 'real' script interaction...
that's not because scripts running on server side doesn't allow 'real' interactivity, that's because sololearn handle them this way ^^
as an example, I can run interactively scripts on pythonanywhere.com without this sololearn limitation...