dimanche 21 novembre 2021

Snowing program [closed]

i built this snowing program using the random module in Python

x=0
sd="."
ends=""
star="*"
space=" "
randomint=random.randint(0,50)
randomint1=random.randint(0,50)
while randomint1<=randomint:
    randomint=random.randint(0,50)
    randomint1=random.randint(0,50)
    print(f"val1={randomint}",f"val2={randomint1}",sep="\n")
while x!=10000:
    for i in range(0,randomint1,randomint):
        s=random.randint(0,1)
        l=random.randint(0,1)
        ss=random.randint(0,1)
        print(star*s,sd*l,space*ss,end="")
    while randomint1<=randomint:
        randomint=random.randint(0,50)
        randomint1=random.randint(0,50)
    x+=1

enter image description here




Aucun commentaire:

Enregistrer un commentaire