Skip to content

Commit 1111ffb

Browse files
committed
user inputs updated.
1 parent f69d7ec commit 1111ffb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

002 - Dice Roll/diceroll.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66

77
while True:
88
askuser = input("Do you want to roll the dice? (y/n): ")
9-
if askuser == "y" or askuser == "Y": # Check both conditions separately
9+
if (
10+
askuser == "y" or askuser == "Y" or askuser == "yes" or askuser == "Yes"
11+
): # Check both conditions separately
1012
print("Rolling...")
1113
time.sleep(1.5)
1214
num = random.randint(1, 6)
1315
print("You got", num)
1416
elif askuser == "n" or askuser == "N": # Check both conditions separately
15-
print("Not, cool! Goodbye!")
17+
print("Not, cool!Goodbye!")
1618
break
1719
else:
1820
print("Invalid input")

0 commit comments

Comments
 (0)