0

Why doesn't this code work

I want it to print hello then good morning after three seconds but that doesn't happen import time print("Hello") time.sleep(3) print("good morning")

28th Dec 2019, 5:09 AM
Pattern
Pattern - avatar
5 ответов
+ 1
In sololearn it will not work. Try that in offline IDE if you on an android try pydroid3 it is good app for learning on ...android.
28th Dec 2019, 5:18 AM
★«D.Connect_Zone»
★«D.Connect_Zone» - avatar
+ 1
Oh yeah it worked by just if I clicked new file then saved the file
28th Dec 2019, 5:33 AM
Pattern
Pattern - avatar
0
I tried it on my laptop but The idle on laptop gives result when I click enter it doesn't wait me until I type print after time.sleep ()?
28th Dec 2019, 5:26 AM
Pattern
Pattern - avatar
0
Hmm.. what IDE you use ? When you run it, it will print hello then wait for 3 sec and will print good morning. I use VS code, Python default IDE, pycharm( these three IDE) time to time and works perfect.
28th Dec 2019, 5:31 AM
★«D.Connect_Zone»
★«D.Connect_Zone» - avatar
0
I just wonder if I could do it without saving file
28th Dec 2019, 5:33 AM
Pattern
Pattern - avatar