Answers for "PYTHON PROGRAM TO COUNT FROM 1 mILLION TO 0"

0

PYTHON PROGRAM TO COUNT FROM 1 mILLION TO 0

#the bug is that it does not stop counting!
import time
n = 0


while ( n <= 1000000):
    n = n + 1
    print(n)
    time.sleep(0) #you can change the sleep to the number of seconds you want
    
else:
    n == 1

print("finished!")
Posted by: Guest on June-26-2021
0

PYTHON PROGRAM TO COUNT FROM 1 mILLION TO 0

#counting from 1 million to 1, using while loop
import time
n = 1000000


while ( n <= 1000000):
    n = n - 1
    print(n)
    time.sleep(0)
    
else:
    n == 1

print("finished!")
Posted by: Guest on June-26-2021

Code answers related to "PYTHON PROGRAM TO COUNT FROM 1 mILLION TO 0"

Python Answers by Framework

Browse Popular Code Answers by Language