Last active
May 26, 2016 14:01
-
-
Save dboyliao/3ec9aa58a42b41070f1d9f78f75d00b5 to your computer and use it in GitHub Desktop.
a simple while example
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
while True: | |
guess = int(input("Enter a number: ")) | |
if guess == 5: | |
print("you win!") | |
break | |
else: | |
print("do other things here") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment