#!/usr/bin/python import random import time secret=random.randrange(1,100) wrongs=0 print "This is a guessing game between 1 and 100!" time.sleep(5) while True: try: guess=int(raw_input("Enter a guess: ")) if guesssecret: print "Too high!" wrongs=wrongs+1 elif guess>100: print "Sorry this number is over 100!" elif guess<1: print "Sorry this number is below 1!" else: print "Correct! It took you ", wrongs, " Attempts." except ValueError: print "Sorry this was an invalid input, keep it numerical!"