blob: 60f53e528ba638a3bb3ce9abaad8dc0f4cf776bb (
plain)
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
|
#!/usr/bin/env python3
import random
def dot(position, spots):
if position in spots:
return(' ')
else:
return('*')
def printFace(val):
spots = list(range(1, 10))
for _ in range(val):
spots.remove(random.choice(spots))
face = '|'
for i in range(1, 10):
face += f'{dot(i, spots)}|'
if i % 3 == 0 and i != 9:
face += '\n|'
print(val, face, sep='\n')
for i in range(0,8):
printFace(i)
|