how to make a timer in python with one second delay | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

how to make a timer in python with one second delay

n=100 while n>0: print(n) n=n-1

18th Feb 2024, 8:42 AM
sahil Kumar
sahil Kumar - avatar
2 Answers
+ 3
sahil Kumar from time import sleep i = 0 while i < 5: i += 1 sleep(1) print(i) print(f"\n{i} seconds have passed.") https://sololearn.com/compiler-playground/cs8wXtIlFq4y/?ref=app
18th Feb 2024, 12:40 PM
Solo
Solo - avatar