-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathab.py
More file actions
32 lines (25 loc) · 667 Bytes
/
ab.py
File metadata and controls
32 lines (25 loc) · 667 Bytes
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
def optionB(a_count,b_count):
done = False
while not done:
print("C or D?")
banswer = input(">>> ")
if banswer == "C":
a_count = a_count + 1
elif banswer == "D":
b_count = b_count + 1
else:
return
a_count = 0
b_count = 0
done = False
while not done:
print("A or B?")
answer = input(">>> ")
if answer == "A":
a_count = a_count + 1
elif answer == "B":
b_count = b_count + 1
optionB(a_count,b_count)
else:
print("I didn't get that--what?")
print("a_count = " + str(a_count) + ", b_count = " + str(b_count))