-
-
Save codecademydev/546e2ca3356a4deb49f95f08825f3d58 to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This is a project | |
That I am writing | |
python NumberGuess.py | |
""" | |
from random import randint | |
from time import sleep | |
def get_user_guess(): | |
guess = int(raw_input("Enter 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 value possible is: %d" % max_val | |
guess = get_user_guess() | |
if guess > max_val: | |
print '%d is to large, please select again' %guess | |
roll_dice(6) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment