Created
February 25, 2011 15:04
-
-
Save avinash2/843904 to your computer and use it in GitHub Desktop.
A simple console guessing game
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
#!usr/bin/env python | |
secret = 101 | |
guess = input('Guess the correct number: ') | |
print 'You have entered: ', guess | |
if guess < secret : | |
print 'Your guess is lower than the expected number. Try again?' | |
if guess == secret : | |
print 'Congratulations! Your guess is correct.' | |
if guess > secret : | |
print 'Your guess is higher than the expected number. Try again?' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment