Created
May 13, 2022 16:07
-
-
Save sshehrozali/90a0c109b3ee3717c321be984c98a139 to your computer and use it in GitHub Desktop.
uncompleted-while-loop
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
| i = 0 # for Parent While Loop | |
| j = 0 # for Child Loop | |
| counter = 10 # DON'T TOUCH IT (constant) | |
| # What's the Output? | |
| # Hello Cat! | |
| # Hello Cat! | |
| # Hello Cat! | |
| # Hello Cat! | |
| # Hello Cat! | |
| # ============ | |
| # Hello Cat! | |
| # Hello Cat! | |
| # Hello Cat! | |
| # Hello Cat! | |
| # Hello Cat! | |
| # ============ | |
| while i < counter: | |
| # Every time we are going to print 5 times | |
| while 0 < 5: | |
| print("Hello Cat!") | |
| j = j + 1 | |
| j = 0 # Reset the value of j after nested loop is ended | |
| print("================") | |
| i = i + 1 # increasing i by 1 step | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment