Created
April 1, 2016 01:19
-
-
Save bensk/ec957b3de5bedbb1cb59ff7eea44ec78 to your computer and use it in GitHub Desktop.
Debugging While Loops.py
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
| # For each example below, predict what will be printed. Then, run the code and confirm your prediction. | |
| a = 0 | |
| while a< 100: | |
| print a | |
| """ | |
| Prediction: | |
| Observation: | |
| """ | |
| a = 0 | |
| while a < 100: | |
| a = a + 1 | |
| print a | |
| """ | |
| Prediction: | |
| Observation: | |
| """ | |
| a = raw_input("Would you like to quit: ") | |
| while a != "y": | |
| a = raw_input("Would you like to quit: ") | |
| """ | |
| Prediction: | |
| Observation: | |
| """ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment