What did I learn?
- What is the correct syntax for a while loop?
- A while loop must first have a method of stoping it so that it won't run in forever. For example, a variable that starts True and then you change it to False to stop the loop or when a variable gets to a certain size. Then you must have the actuall while loop statment with the break case. Then you indent and put the content of the while loop.
- Here's an example:
- while myCase < 10:
- #code that gets loped
- What is a good use of remove in a program?
- In my program one good use was removing the users favorite ice cream from the array of ice creams so the computer could pick a different one.
Check out my Python script here!