-
Notifications
You must be signed in to change notification settings - Fork 0
/
dicegame.py
49 lines (43 loc) · 1.09 KB
/
dicegame.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
import random
x = "y"
while x == "y":
# Generates a random number
# between 1 and 6 (including both 1 and 6)
no = random.randint(1 , 6)
if no == 1:
print("[-----]")
print("[ ]")
print("[ 0 ]")
print("[ ]")
elif no == 2:
print("[-----]")
print("[ 0 ]")
print("[ ]")
print("[ 0 ]")
print("[-----]")
elif no == "3":
print("[-----]")
print("[ ]")
print("[0 0 0]")
print("[ ]")
print("[-----]")
elif no == 4:
print("[-----]")
print("[0 0]")
print("[ ]")
print("[0 0]")
print("[-----]")
elif no == 5:
print("[-----]")
print("[0 0]")
print("[ 0 ]")
print("[0 0]")
print("[-----]")
elif no == 6:
print("[-----]")
print("[0 0 0]")
print("[ ]")
print("[0 0 0]")
print("[-----]")
x = input("press y to roll again and n to to exit: " )
print("\n")