File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 5
5
print ("**********************************" )
6
6
7
7
while True :
8
- askuser = input ("Do you want to roll the dice? (y/n): " )
9
- if (
10
- askuser == "y" or askuser == "Y" or askuser == "yes" or askuser == "Yes"
11
- ): # Check both conditions separately
8
+ askuser = input ("Do you want to roll the dice? (y/n): " ).lower ()
9
+ if askuser == "y" or askuser == "yes" :
12
10
print ("Rolling..." )
13
11
time .sleep (1.5 )
14
12
num = random .randint (1 , 6 )
15
- print ("You got" , num )
16
- elif askuser == "n" or askuser == "N" : # Check both conditions separately
17
- print ("Not, cool!Goodbye!" )
13
+ print ("You got" , num , "!" )
14
+ elif askuser == "n" or askuser == "no" :
15
+ print ("Not cool! Goodbye!" )
18
16
break
19
17
else :
20
18
print ("Invalid input" )
You can’t perform that action at this time.
0 commit comments