Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

while loop choosing numbers

import random
import time

random_number = (1,999) #choose a number. you can choose whatever you want
cando = True
times = 0

while cando:
    go_print = random.randint(random_number)
    print(go_print)
    times = times + 1
    time.sleep(0.05)
    if times == 100:
        cando = false
        print("the number is" + go_print)    
 
PREVIOUS NEXT
Tagged: #loop #choosing #numbers
ADD COMMENT
Topic
Name
4+3 =