-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdice_roller.py
More file actions
58 lines (50 loc) · 1.54 KB
/
Copy pathdice_roller.py
File metadata and controls
58 lines (50 loc) · 1.54 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
50
51
52
53
54
55
56
57
58
import random
print("This program will roll a 1d6, or six-sided die.")
begin = input("Hit 'y' to roll! ").lower()
print()
if begin == "y":
diceroll = random.randint(1,6)
if diceroll == 1:
print("You rolled a 1!")
print("===========")
print("| |")
print("| O |")
print("| |")
print("===========")
elif diceroll == 2:
print("You rolled a 2!")
print("===========")
print("| |")
print("| O O |")
print("| |")
print("===========")
elif diceroll == 3:
print("You rolled a 3!")
print("===========")
print("| O |")
print("| O |")
print("| O |")
print("===========")
elif diceroll == 4:
print("You rolled a 4!")
print("===========")
print("| O O |")
print("| |")
print("| O O |")
print("===========")
elif diceroll == 5:
print("You rolled a 5!")
print("===========")
print("| O O |")
print("| O |")
print("| O O |")
print("===========")
elif diceroll == 6:
print("You rolled a 6!")
print("===========")
print("| O O |")
print("| O O |")
print("| O O |")
print("===========")
else:
print("OK, fine, be that way.")