top of page

03.13.2018: One Lesson of Python

Today's soundtrack is Samantha Fish: Black Wind Howlin'.

I've made it to the "Turtle Graphics" section of Coding Projects in Python, which is a welcome change of pace. I learned right away that I shouldn't call the file "turtle.py" to avoid any system errors, and I found out that Python uses the US spelling, "color."

I began by importing the "turtle" module and renaming it "t," defined a function for what makes a rectangle, then placed a bunch of rectangles around the screen to make a robot. I ran into a lot of trouble with forgetting to close brackets for commands like "penup" and "endfill," but I finally sorted out my problems.

For fun, I added some buttons to the robot's torso and swung one of its arms down. The robot looks like garbage, but hey, it's mine.


bottom of page