We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f69d7ec commit 1111ffbCopy full SHA for 1111ffb
002 - Dice Roll/diceroll.py
@@ -6,13 +6,15 @@
6
7
while True:
8
askuser = input("Do you want to roll the dice? (y/n): ")
9
- if askuser == "y" or askuser == "Y": # Check both conditions separately
+ if (
10
+ askuser == "y" or askuser == "Y" or askuser == "yes" or askuser == "Yes"
11
+ ): # Check both conditions separately
12
print("Rolling...")
13
time.sleep(1.5)
14
num = random.randint(1, 6)
15
print("You got", num)
16
elif askuser == "n" or askuser == "N": # Check both conditions separately
- print("Not, cool! Goodbye!")
17
+ print("Not, cool!Goodbye!")
18
break
19
else:
20
print("Invalid input")
0 commit comments