Introduction to Turtle Graphics with Trinket¶
These labs assume that you have internet access and a modern web browser such as Chrome.
We use the Trinket web site because it a kid-safe place that has many of the basic turtle drawing libraries implemented in and easy-to-use web environment. It is appropriate for students just getting started with python programming but has limited libraries for our advanced data analysis and plotting labs. The free version is limited to the older Python 2.X functionality, but this meets all the needs of our beginning python class.
If you want to try another web-based system that support turtle graphics and Python 3.X we suggest the web site repl.it. Note that repl.it is not specifically designed for kids.
Beginning Python Journey Map¶
The map above is a visual guide to our Introduction to Python course. Students start their journey in the upper left corner at the green start circle. They then journey through each of the lessons until they reach the finish line. Many of our courses give badges and laptop stickers for students that complete the journey from the start to the finish.
List of Trinket Python Learning Labs¶
For students that are new to programming, here are some sample programs (what we call learning labs) that you can try. You can learn by reading the sample programs, going to the Trinkit.io site and changing some values in the code. Each of the labs has experiments at the end you can do to extend to see if you have mastered the concepts before you go on to the next lab.
- Trinket Account - introduction to the Turtle Graphs library with a list of drawing functions
- Turtle graphics - introduction to the Turtle Graphs library with a list of drawing functions
- Simple square - draw a square by moving and turning right four times
- Variables - add variables for the move edge distance and angle
- Loops - add a loop to make our code smaller
- Conditionals - add an if statement to change the color
- Functions - create a shape function
- Function parameters - add parameters to our function
- Random - generate random numbers that are used do drive the turtle
- Lists - store a list of colors
- Inputs - get some input from the user
- Recursion - create a function that calls itself to draw a tree