Question: The program segment below should result in an infinite loop. But the lines have been mixed up and include extra lines of code that aren't

The program segment below should result in an infinite loop. But the lines have been mixed up and include extra lines of code that aren't needed in the solution. Correct the code so that it loops! Immediately after the code starts looping (producing endless output), press the STOP button (filled square, to the right of the Run button, above, as explained in class) in the notebook to cancel execution. Do not send me a notebook filled with "This is an infinite loop"; I won't be able to load it because the file will be too large. Instead, copy the code that looped into a new cell. Then, click the original cell which produced the looping output and click the Edit menu and select Cut Cells That will delete the code and the output cell. That way, you won't be sending me a file that might be too large for me to upload to Jupyter; I will run your code t verify that it loops (ugh!)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
