+ 1
I NEED HELP
How do i create a program that randomly shows either Left or Right without stoping? (In Python)
9 Answers
+ 3
try this:
import random
ntDone=True
l=âleftâ
r=ârightâ
while(ntDone):
x=random.randint(0,1)
if x==0:
print(l)
else:
print(r)
ntDone=str(input(âCont.? Y/Nâ))
if ntDone==âYâ or ntDone==âyâ:
ntDone=True
else:
ntDone=False
Will only work in computer though
+ 1
Yes
+ 1
Exactly
0
What i mean is when i run the code the output should just randomly either show âLeftâ or âRightâ till i end it. Idk if you get what i mean
0
Yes it works thank you soo much i feel so dumb đđ but now i just have to be able to make it start and stop and slow it down but thanks đ