-
Notifications
You must be signed in to change notification settings - Fork 39
/
Roll_the_dice
41 lines (40 loc) · 1007 Bytes
/
Roll_the_dice
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
import random
while True:
number = random.randint(1, 6)
switcher = {
1: "----------\n"
"| |\n"
"| 0 |\n"
"| |\n"
"----------",
2: "----------\n"
"| 0 |\n"
"| |\n"
"| 0|\n"
"----------",
3: "----------\n"
"| 0 |\n"
"| 0 |\n"
"| 0|\n"
"----------",
4: "----------\n"
"| 0 0 |\n"
"| |\n"
"| 0 0 |\n"
"----------",
5: "----------\n"
"| 0 0 |\n"
"| 0 |\n"
"| 0 0 |\n"
"----------",
6: "----------\n"
"| 0 0 |\n"
"| 0 0 |\n"
"| 0 0 |\n"
"----------",
}
print(switcher.get(number))
choice = input("Do you want to roll again(y/n):")
if choice != 'y':
print("Thank You")
break