You seem to have confused if
and while
. if
only runs at most once. while
will run any number of times until the condition is false.
while num > 2:
...
2
solved Did not understand the outputs [closed]
You seem to have confused if
and while
. if
only runs at most once. while
will run any number of times until the condition is false.
while num > 2:
...
2
solved Did not understand the outputs [closed]