-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbingo 2.py
79 lines (42 loc) · 1.06 KB
/
bingo 2.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# --------------------------
# Title: BINGO 2
# By: Zane Dax
# March 4, 2021
# Notes: the game information came from Wikipedia
# --------------------------
# BINGO
# numbers 1 - 75
# 5 columns
# 15 numbers in each column
# B = 1 - 15
# I = 16 - 30
# N = 31 - 45
# G = 46 - 60
# O = 61 - 75
# possible Bingo cards
# P(15,5) * P(15,5) * P(15,5) * P(15,5) * P(15,5) = 5.52e26
import random
# columns = ['B','I','N','G','O']
# x = random.randint(0,(len(columns)-1))
columns = ['B','I','N','G','O']
x = random.randint(0,(len(columns)-1))
number = random.randint(1,76)
print("\n ***** BINGO *****")
# print(columns[n], number)
# print(number)
if columns[x] == 'B':
b = random.randint(1,16)
print(' ', columns[x], b)
if columns[x] == 'I':
i = random.randint(16,31)
print(' ',columns[x],i)
if columns[x] == 'N':
n = random.randint(31,46)
print(' ', columns[x], n)
if columns[x] == 'G':
g = random.randint(46,61)
print(' ', columns[x],g)
if columns[x] == 'O':
o = random.randint(61,76)
print(' ', columns[x],o)
print(" ***** BINGO *****\n")