4. Turtle Drawing Practice¶
Quick Overview of Day
for loops and functions to draw shapes elegantly. Continue working on a Python turtle graphics assignment, focused on repetition and conditionals.
4.1. Practice Problems¶
4.1.1. Inner Squares¶
Define a function similar to
draw_square(my_turtle, side_length) and call it twice to draw the shape above. You may find it helpful define a new version of of this function, instead of reusing the one from yesterday. Perhaps you might not start in the same location as we did the last time we drew a square?
4.1.2. Square Logo¶
Draw the shape above. Depending on how you defined the function in the problem above, you may be able to easily use reuse your function.
4.1.3. Overlapped Squares¶
Draw the shape above. Depending on how you defined your earlier function(s) in the problems aboves, you may be able to easily use reuse your function(s).
4.1.4. Bonus - If You Are Done Before Others¶
Draw the shape above. Think carefully about how you might be able to draw this elegantly (efficiently and readably)! Creating an adapted version of one of your previous functions isn’t a bad idea…
4.2. Turtle Graphics Assignment¶
Use the rest of this class time to keep working on your current Python assignment (possibly a turtle graphics drawing, with a focus on looping and conditionals).