QuestenaՎարժանք, որը ցույց է տալիս՝ ինչ կրկնել հաջորդիվ
Հարց 63

When no break, return, or exception occurs, when does a while loop test its condition, and what makes repetition stop?

  1. Only once, before the loop; a return value stops it
  2. After every pass; a true condition stops it
  3. Before every pass; a falsy condition stops itՃիշտ պատասխան
  4. Only after the body; an empty body stops it

Բացատրություն

The condition is checked before every attempted pass, so a false initial condition prevents the body from running at all. A post-body-only test would incorrectly guarantee at least one execution.

Շարունակեք այս թեստով

Սկսել վարժանքը
Հարց 63: When no break, return, or exception occurs, when does a… · Python Fundamentals · Questena