Skip to content

Instantly share code, notes, and snippets.

@avinash2
Created July 22, 2013 16:41
Show Gist options
  • Save avinash2/6055407 to your computer and use it in GitHub Desktop.
Save avinash2/6055407 to your computer and use it in GitHub Desktop.
Simple game with Python
#!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