Why plaground is not responding correctly to the codes? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Why plaground is not responding correctly to the codes?

While coding you usually need an output which might be a message or a question then you might need more than one input and offcourse respectively but playground does not act as expected! It gets the input or inputs then prints outputs and can not distiguish or differentiate between diffrrrent inputs which any of them might belong to differrent steps .. terminals and compilers such as g++ in computers act more logically!

2nd Nov 2017, 6:18 PM
irajjs
irajjs - avatar
9 Answers
+ 6
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.
2nd Nov 2017, 6:22 PM
visph
visph - avatar
+ 5
@Netkos: I didn't said "for the last time" but "one more time"... it doesn't mean that it was the only or last one ;P
2nd Nov 2017, 6:35 PM
visph
visph - avatar
+ 3
"applicability"? Sololearn playground purpose is just to test some code snippets, eventually share much more complex/long code, not to run app in app ^^ If you want to run code on your mobile, search for and use dedicated apps able to compile/run your target language (for example, Python scripts can be run locally with QPython on android...)
2nd Nov 2017, 6:42 PM
visph
visph - avatar
+ 2
lol Don't lie Visph, just like myself you're going to answer this question EVERY time it's asked. It's just the curse we live. ;)
2nd Nov 2017, 6:32 PM
AgentSmith
+ 2
@Visph Haha! Fair enough. :D
2nd Nov 2017, 6:53 PM
AgentSmith
+ 2
@Irajjs Trust me, the last thing you want is for any code to be able to run here on SL. Imagine what I could create and then trick all of you into running? I could easily harm you and the server, which isn't a good thing. Since this is freely open to the world, the security of the clients and the server is most important. As such, you have to regulate and prevent a lot of things from happening, otherwise you run into the problem I just mentioned. You're best off utilizing a real IDE/compiler for your code, rather than focusing on Code Playground as your IDE/compiler.
2nd Nov 2017, 6:56 PM
AgentSmith
+ 1
Thank you , but this causes a lower applicability specially when sololearn is used on a mobile device which has limitations by itself!
2nd Nov 2017, 6:37 PM
irajjs
irajjs - avatar
+ 1
each new input on another line
2nd Nov 2017, 6:44 PM
Abdur-Rahmaan Janhangeer
Abdur-Rahmaan Janhangeer - avatar
+ 1
Now i have to explain why and when i want to use playground: My main coding activity is done on my PC which i never connect to Internet! .. So no seriuos harm can or will affect my work .. But whenever i want to add a new code to my sololearn account and make it public! i need to know if that code will work on sololearn playground or not! Offcourse! I select codes which work on my PC .. Thank you all
2nd Nov 2017, 7:15 PM
irajjs
irajjs - avatar