This week we used the https://trinket.io/ free online coding playground to get an introduction to the Python programming language. Python is great for backend web development, data sciences, and computing. To get our feet wet, we started with a drawing library called Turtle.
Check out the documentation for Turtle Graphics:
https://docs.python.org/3.3/library/turtle.html?highlight=turtle
Check out the documentation for Turtle Graphics:
https://docs.python.org/3.3/library/turtle.html?highlight=turtle
Part 1: Getting started with Python Turtle drawing library
Investigate:
- Connect the two dots with a yellow line
- Draw a green dot in the center of the bottom left quadrant
- Make the dots bigger or smaller
- Draw a square connecting 4 dots (use different colors for each side of the square)
- Instead of a ‘dot’, draw a ‘circle’
- Print the coordinates of the bottom corners of the square
- Print the coordinates of the midpoints of the sides of the square
Part 2: Add to this Trinket that draws a stick person
Investigate:
- Make the pen draw faster or slower
- Draw two eyes (circular or dotted) and a mouth on the person
- Draw a hat on the person
- What do “forward” and “backward” do?
- What about “right” and “left” ?
- Fill in the hat with any color you choose
- *Hint: myPen.begin_fill() and myPen.end_fill

