I received an error for the prettyPrint()
command but when I compare my code to the answer it seems to be the same. However, I did notice that the prettyPrint()
command seems to be nested within the parameters assigned as bingo
at the bottom.
The AI debugger is also suggesting a solution that I can’t seem to implement:
“The error in your project is that the closing parenthesis for the bingo
list is missing in the prettyPrint
function call.”
Is this a formatting issue or something else?
import random
bingo = []
def ran():
number = random.randint(1,90)
return number
def prettyPrint():
for row in bingo:
print(row)
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()