+ 1

Carriage return problem in the playground

I have tried using a carriage return while trying to make a simple loading animation in the command prompt. Why does it not work? Is it a thing of this code playground? And also, is time.sleep() function usable in this Sololearn platform? https://code.sololearn.com/cF9Xu8C9FjwQ/?ref=app

20th Nov 2018, 5:44 PM
Jurgis Ramanauskas
Jurgis Ramanauskas - avatar
4 Answers
+ 4
Yes, carriage return and time.sleep() do not work so well on Sololearn. Python codes are executed in Sololearn's server and the whole output is displayed at once. So even though time.sleep() executes correctly, it won't help us create an animation. (Aside: to test that it does execute, you can add time.sleep(5.1) to any code. The output would show Time Limit Exceeded, because the time limit is 5 seconds.) I don't know the reason for carriage return.
20th Nov 2018, 5:58 PM
Kishalaya Saha
Kishalaya Saha - avatar
+ 2
for languages like Python, C, C++ and all except core web development languages, sololearn code playground takes whole input at once and gives whole output as once. If you want animation kind of thing, you can try in pc or some other IDE..😀
20th Nov 2018, 6:00 PM
Zoetic_Zeel
Zoetic_Zeel - avatar
+ 1
I’m still looking for an answer for the carriage return symbol issue
20th Nov 2018, 6:22 PM
Jurgis Ramanauskas
Jurgis Ramanauskas - avatar
0
thank you for your kind help!
20th Nov 2018, 6:21 PM
Jurgis Ramanauskas
Jurgis Ramanauskas - avatar