Hi, I have been working on the Number Guess Project in Learn Python 2 and I have been having some trouble to get the Terminal to display a question that I have coded using the
raw_input function. I have worked until the 17th step and my code is as follows:
from random import randint from time import sleep def get_user_guess(): guess = int(raw_input("Guess a number: ")) 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 "Please guess a number under the maximum value."
When I type “python NumberGuess.py” into the terminal nothing happens. Thank you for your help.