This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| number = 23 | |
| running = True | |
| while running: | |
| guess = int(input('Enter an integer : ')) | |
| if guess == number: | |
| print ("Congratulations, you guessed it.") | |
| running = False # this causes the while loop to stop | |
| elif guess < number: | |
| print ("No, it is a little higher than that.") |
NewerOlder