Hi! Trying to figure out why I get this error, and cannot find the problem. I have checked the community too, and seems to be the same code as other members… Any idea, please? (I have tried to upload a screengrab, but couldn’t)
from random import randint from time import sleep def get_user_guess(): guess = int(raw_input("What is your guess? ")) return guess def roll_dice(number_of_sides): first_roll = randint(1, number_of_sides) second_roll = randint(1, number_of_sides) max_val = number_of_sides * 2 print "The maximum possible value is: %d" % max_val guess = get_user_guess() if guess > max_val: print "Your guess is invalid"