On 29/03/13 12:34, Alan Gauld wrote: A slight tweak to the solution; you probably need: > So in pseudo code you should have while True: read input if exit condition break try: convert to int break except ValueError: continue process the value HTH -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/