-
Notifications
You must be signed in to change notification settings - Fork 0
/
bingocaller.py
40 lines (40 loc) · 1.02 KB
/
bingocaller.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
35
36
37
38
39
40
from random import randint as ri
from sys import exit
calls=[]
ltrs=['b','i','n','g','o']
while 1:
callltr=ltrs[ri(0,len(ltrs)-1)]
match(callltr):
case "b":
nummin=1
nummax=15
case "i":
nummin=16
nummax=30
case "n":
nummin=31
nummax=45
case "g":
nummin=46
nummax=60
case "o":
nummin=61
nummax=75
callnum=ri(nummin,nummax)
print(callltr)
print(callnum)
calls.append(str(callltr)+"\n"+str(callnum))
try:
cmd=input()
except KeyboardInterrupt:
exit(0)
match(cmd):
case "c":
calls.clear()
print("calls cleared")
case "s":
print("called so far: ")
for i in calls:
print(i)
case "?":
print("Available Commands: question mark, ?: Show help. c: Clear List of calls. s: Show calls made so far. Any unrecognized command will continue generation.")