Speed complain | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Speed complain

why does it take so long to print output while writing codes in python?? i tried some codes in the "code playground" and it took ages to print output (it wasn't error).. can someone explain this to me?

10th Dec 2017, 4:19 PM
Kyrollous Ashraf
Kyrollous Ashraf - avatar
1 Answer
+ 20
This is what happened when you press the RUN button @ Code Playground: (1) Scan the source code locally by matching keywords that read user input. If it's required, ask the user to provide beforehand in one-go. That means step-by-step/sequential input will not work. This is how most online compiler works otherwise the server resource will be withhold indefinitely if the user didn't provide any input. (2) Send the source code to the server to compile. The server maybe a few thousand km/mile from you which caused the delay. (3) The server responds with the code output or compilation error message if it the source code is invalid. You may get errors occasionally as well if the server is busy. P/S: This doesn't apply to the Web code as it's directly run in user's device WebView and hence it always produce the result almost instantly. 😉
10th Dec 2017, 4:37 PM
Zephyr Koo
Zephyr Koo - avatar