#!/usr/bin/env python # Filename: while.py number=23 running=True while running: guess=int(raw_input('Enter an integer : ')) if guess==number: print 'Congratulations, you guessed it.' running=False # this causes the while loop to stop elif guess