I am having trouble with this program.
- invalid syntax on line 22
- multiple indent errors but can't seem to fix them.
I have even copied and pasted other people's code and it is not working for me. Help!
from random import randint from time import sleep def get_user_guess(): user_guess = int(raw_input("Guess a number: ")) return user_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: " + str(max_val) sleep(1) user_guess = get_user_guess() if user_guess > max_value: print "No guessing higher than the maximum possible value!" return else: print "Rolling..." sleep(2) print "The first Value is: %d" % first_roll sleep(1) print "The second value is: %d" % second_roll sleep(1) total_roll = first_roll + second_roll print "the total value is: %d" % total_roll if user_guess > total_roll: print "You Won!" return else: print "You lost, try again." return roll_dice(6)