Pass, Else in a while LoopPass, Else in a while Loop

Let me remind you that the pass statement is a null statement. Nothing happens when the statement is executed.

Look at the code below:

Also as a reminder, in Python, a loop can have the else block, which will be executed when the loop terminates normally.

Look at the code below:

Task

  1. Fill the gaps with while, pass, and else.

Everything was clear?

Section 2. Chapter 6
toggle bottom row