The task for this project was to write a program that would draw shapes in a particular pattern (both a line and a grid), based on the string that was used in the function.
The grid drawing algorithm needs to somehow tell the turtle to draw 10 shapes in a line and then move to a new location and draw another 10 shapes in a line, and then continue this process.
In my algorithm, I used a loop within a loop for my grid function. The outer loop is a for loop, which tells the turtle to take each letter of the string and print the corresponding shape. The inner loop uses the if and else commands. It uses the mod function to tell the turtle to keep on drawing linearly (without changing the y co-ordinate) until there are 10 shapes. Then, when there are 10 shapes, the else function applies, which tells the turtle to go back to the original x coordinate and then move down and additional 20 pixels from the last time the else function was called. It repeats this for the length of the string.
For Scenes A,B, and C, I extended the elif loop to allow for more shapes
To make sceneD I changed the color of the shapes. Instead of uswing the random color setting, I made each shape a different color, and instead of randomly chosing which character to put in the string, I used the same three characters and repeated them to create a long string.