Introduction While statement execute the statement subject to condition attached. The statement could be affirmatively declared true to allow the execution. However after while any condition to could be attached to function. Syntax "While" condition attached: "Do this' exception ":" "Do this" Parameters parameter could be string or numbers The loop returns with:
While loop return with the value from 14 to 1.
The turtle dot loop is generated through while statement and colors are selected through the random.sample method.
|
Python > Control Flow >