+ 1
Can any one give me count down code?
My code aren't working!
10 ответов
+ 11
Otaku ,
> to get the code run, it has to be *formated properly*
> using sleep() is *NOT* supported in sololearn playground
> to use sleep() we need to import time module
> the code then is doing the countdown, and printing "happy new year" in each loop cycle.
if it should print the output only once when the countdown is finished, move it outside the loop.
+ 8
Hi Otaku, we need more information to help you. As Yasin wrote, can we see a code?
Can you please also read these and maybe update your question.
https://www.sololearn.com/discuss/3021159/?ref=app
https://code.sololearn.com/W3uiji9X28C1/?ref=app
https://code.sololearn.com/Wek0V1MyIR2r/?ref=app
+ 5
Otaku Share your code
+ 1
for seconds in range(10, 0, -1):print(seconds) time.sleep(1) print("happy new year")
+ 1
Hello! As Ausgrindtube said, read those links and upload your code to your question, so we can answer your question
+ 1
Ok
+ 1
Share your code using code playground
+ 1
import time -> have you imported time???
for seconds in range(10, 0, -1):
print(seconds)
time.sleep(1)
print(“happy new year”)
+ 1
Sony Hossain this is not what otaku was asking for