Name | while |
||||
---|---|---|---|---|---|
Examples |
i = 0 while i < 80: line(30, i, 80, i) i = i + 5 | ||||
Description |
Controls a sequence of repetitions. The while structure executes a series of statements continuously while the expression is True. The expression must be updated during the repetitions or the program will never "break out" of while.
This function can be dangerous because the code inside the while loop will not finish until the expression inside while becomes False. It will lock out all other code from running (e.g., mouse and keyboard events will not be updated). Be careful — if used incorrectly, this can lock up your code (and sometimes even the Processing environment itself). |
||||
Syntax | while expression: statements | ||||
Parameters |
| ||||
Related |
for |
Updated on Tue Feb 27 14:07:12 2024.
If you see any errors or have comments, please let us know.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License