Drawing & Control Structures
You can use control structures such as if/else statements, while loops, and for loops to draw repeating patterns. In addition, you can add an element of change to the program with the random function. Here's an example:
The above code was run 6 times and the results are shown in the applets below: