done = False while not done: try: age=raw_input("age: ") age=int(age) age+=1 print age done = True except: print "Incorrect input."