Guest User

Untitled

a guest
May 2nd, 2017
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.81 KB | None | 0 0
  1. from random import randint
  2. var = raw_imput("How many dices do you want, 1 or 2?"
  3. rollagain = 'yes'
  4. def two():
  5.     while rollagain == "yes" or "y":
  6.         print'Rolling the dices..."
  7.        print'The values are ' + str(randint(1,6)) + str(randint(1,6))
  8.        rollagain = raw_input("Roll the dices again?")
  9. def one():
  10.    while rollagain == "yes" or "y":
  11.        print'Rolling the dice..."
  12.        print'The value is ' + str(randint(1,6))
  13.        rollagain = raw_input("Roll the dice again?")
  14. if var == "1":
  15.    one()
  16. elif var == "2":
  17.    two()
  18. else:
  19.    print'You entered an invalid answer. I am gonna roll either 1 or two dices now. PS - learn to type'
  20.    vari = (randint(1,2))
  21.    if vari == 1:
  22.        print'A single dice it is."
  23.         one()
  24.     else:
  25.         print'Two dices, INCOMING!!!!"
Add Comment
Please, Sign In to add comment