-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathL or R.py
34 lines (27 loc) · 842 Bytes
/
L or R.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from random import randint
from sys import exit
while True:
score = 0
count = 0
while count <= 10:
count += 1
rand = randint(0,1)
if rand == 0:
print("*")
correct = "l"
if rand == 1:
print(" *")
correct = "r"
print("left or right")
answer = input("l or r")
if answer == correct:
score += 1
print("==============================================================================")
print(str(score) + "/10")
if score == 10:
print("winner")
else:
print("looser")
if input("Enter play to play agan.") == "":
exit()
print("==============================================================================")