Sep-17-2019, 11:59 PM
(This post was last modified: Sep-17-2019, 11:59 PM by johnnynitro99293.)
I am a beginner in Django. I am trying to solve a Bingo card game problem, where I have to generate an array and print the random numbers without any duplication.
I have to print this output:
I have to print this output:
W O R L D W 10 93 85 14 18 O 24 96 88 29 23 R 36 33 99 90 31 L 46 48 92 95 43 D 59 76 51 72 58It's a bingo game. The card gets filled with random Numbers. I have tried the following codes:
import random class Card: def __init__(self): self.b = random.sample(range(1,100),5) self.i = random.sample(range(1,100),5) self.n = random.sample(range(1,100),5) self.g = random.sample(range(1,100),5) self.o = random.sample(range(1,100),5) print(self.b) print(self.i) print(self.n) print(self.g) print(self.o)The codes don't deliver the desired output.