-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsimple_dice.py
More file actions
49 lines (44 loc) · 1.19 KB
/
simple_dice.py
File metadata and controls
49 lines (44 loc) · 1.19 KB
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
print("Here is a simple dice simulator")
x="x"
while x=="x":
number=random.randint(1,6)
if number == 1:
print("----------")
print("| |")
print("| X |")
print("| |")
print("----------")
if number == 2:
print("----------")
print("| |")
print("| X X |")
print("| |")
print("----------")
if number == 3:
print("----------")
print("| X |")
print("| X |")
print("| X |")
print("----------")
if number == 4:
print("----------")
print("| X X |")
print("| |")
print("| X X |")
print("----------")
if number == 5:
print("----------")
print("| X X |")
print("| X |")
print("| X X |")
print("----------")
if number == 6:
print("----------")
print("| X X |")
print("| X X |")
print("| X X |")
print("----------")
x = input("Press x to roll again or Press e to quit the simulation")
if x=="e":
quit