#!/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)