Skip to content

Commit

Permalink
Create day43_2DList.py
Browse files Browse the repository at this point in the history
  • Loading branch information
devendra2689 authored Oct 13, 2024
0 parents commit 75e465a
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions day43_2DList.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import random

bingo = []

def ran():
number = random.randint(1,90)
return number

def prettyPrint():
for row in bingo:
#print(row)
print(f"{row[0] } | {row[1]:^7} | {row[2]}")

numbers = []
for i in range(8):
numbers.append(ran())

numbers.sort()

bingo = [ [ numbers[0], numbers[1], numbers[2]],
[ numbers[3], "BINGO", numbers[4] ],
[ numbers [5], numbers[6], numbers[7]]
]

prettyPrint()

0 comments on commit 75e465a

Please sign in to comment.