Created
August 27, 2014 21:12
-
-
Save danhyun/b15fba758f0add6a8ae9 to your computer and use it in GitHub Desktop.
keep printing numbers as long as it is not 0
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
| prompt = "Give me a number: " | |
| i = input(prompt) | |
| while i: | |
| print "You entered %s whose square is %s" % (i, i * i) | |
| i = input(prompt) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment