forked from techyminati/python_codes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DiceSimulator.py
51 lines (41 loc) · 1.12 KB
/
DiceSimulator.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
import random
user = input("Do you want to roll the dice ")
while user == "y":
k = random.randint(1,6)
if k == 1:
print(" --------- ")
print("| |")
print("| 0 |")
print("| |")
print(" --------- ")
if k == 2:
print(" --------- ")
print("| 0 |")
print("| |")
print("| 0 |")
print(" --------- ")
if k == 3:
print(" --------- ")
print("| 0 |")
print("| 0 |")
print("| 0 |")
print(" --------- ")
if k == 4:
print(" --------- ")
print("| 0 0 |")
print("| |")
print("| 0 0 |")
print(" --------- ")
if k == 5:
print(" --------- ")
print("| 0 0 |")
print("| 0 |")
print("| 0 0 |")
print(" --------- ")
if k == 6:
print(" ---------- ")
print("| 0 0 |")
print("| 0 0 |")
print("| 0 0 |")
print(" ---------- ")
user = input("Do you want to roll again the dice ")