aboutsummaryrefslogtreecommitdiff
path: root/scripts/face_randomizer.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/face_randomizer.py')
-rw-r--r--scripts/face_randomizer.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/face_randomizer.py b/scripts/face_randomizer.py
new file mode 100644
index 0000000..60f53e5
--- /dev/null
+++ b/scripts/face_randomizer.py
@@ -0,0 +1,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)
+
+