viewing paste ryan | Text

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
"""yawn
"""
from random import randint
from time import sleep
 
def get_user_guess():
  
  user_guess = int(raw_input("Please enter your guess: "))
  
  return user_guess
  
  
def roll_dice(number_of_sides):
  
  
  
  first_roll = randint(1 , number_of_sides)
  second_roll = randint(1, number_of_sides)
  number_of_sides = int(raw_input("Please pick the number of sides the dice will have: "))
  max_val = number_of_sides * 2
  print "The max possible value is: " + str(max_val)
  sleep(1)
  user_guess = get_user_guess()
  
  if user_guess > max_val:
    print "Your guess is fucking too big fool."
    return
  
  else:
    print "Rolling...."
    sleep(2)
    print "The first roll is: %d" % first_roll
    sleep(1)
    print "The second roll is: %d" % second_roll
    sleep(1)
    total_roll = first_roll + second_roll
    print "The total is: %d" % total_roll
    print "Result... "
    sleep(1)
    if user_guess > total_roll:
      print "You fucking won woopee"
      return
    else:
      print "You fucking loser"
      return
roll_dice(number_of_sides)
Viewed 894 times, submitted by Guest.