fork download
  1. import random
  2. min = 1
  3. max = 6
  4.  
  5. roll_again = "yes"
  6.  
  7. while roll_again == "yes" or roll_again == "y":
  8. print("rolling the dice...")
  9. print("The values are....")
  10. print(random.randint(min, max))
  11. print(random.randint(min, max))
  12.  
  13. roll_again = input("Roll the dice again? ").lower()
  14.  
  15. print("Goodbye")
Success #stdin #stdout 0.02s 11664KB
stdin
yes
Yes
yEs
YES
Y
y
nope
stdout
rolling the dice...
The values are....
5
5
Roll the dice again? rolling the dice...
The values are....
4
3
Roll the dice again? rolling the dice...
The values are....
1
6
Roll the dice again? rolling the dice...
The values are....
1
6
Roll the dice again? rolling the dice...
The values are....
1
3
Roll the dice again? rolling the dice...
The values are....
1
2
Roll the dice again? rolling the dice...
The values are....
1
3
Roll the dice again? Goodbye