-
Notifications
You must be signed in to change notification settings - Fork 0
/
04_Dice_Stimulator.py
55 lines (47 loc) · 1.52 KB
/
04_Dice_Stimulator.py
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
from random import randint
while True:
roll_the_dice = randint(1,6)
def print_dice(dice):
if dice ==1:
print(" ---------------")
print(" | "," "," "," "," | ")
print(" | "," "," • "," "," | ")
print(" | "," "," "," "," | ")
print(" ---------------")
elif dice == 2:
print(" ---------------")
print(" | "," • "," "," "," | ")
print(" | "," "," "," "," | ")
print(" | "," "," "," • "," | ")
print(" ---------------")
elif dice == 3:
print(" ---------------")
print(" | "," • "," "," "," | ")
print(" | "," "," • "," "," | ")
print(" | "," "," "," • "," | ")
print(" ---------------")
elif dice == 4:
print(" ---------------")
print(" | "," • "," "," • "," | ")
print(" | "," "," "," "," | ")
print(" | "," • "," "," • "," | ")
print(" ---------------")
elif dice == 5:
print(" ---------------")
print(" | "," • "," "," • "," | ")
print(" | "," "," • "," "," | ")
print(" | "," • "," "," • "," | ")
print(" ---------------")
else:
print(" ---------------")
print(" | "," • "," "," • "," | ")
print(" | "," • "," "," • "," | ")
print(" | "," • "," "," • "," | ")
print(" ---------------")
print_dice(roll_the_dice)
stop_stimulator = input ("""Do you want to stop the Dice Stimulator ?
If you want to stop type 'yes' otherwise just press enter: """).lower()
if stop_stimulator == "yes":
break
else:
print ("\n")