coding_icon
My Code

I am learning Python right now, which is a programming language. I am also reading a book called Coding for Kids: Python.

I use Thonny to edit and run my Python code as well as install third-party modules.

Screenshot of the Thonny Python editor

Turtle

In this code, I set a variable to 7. I used a for loop (for i in range(7)), and each time the variable goes down by 1. If the variable equals 0, the turtle turns red, stamps, and goes forward by 50. If it equals 1, it turns orange, stamps, and goes forward by 50. It keeps going like that until 6, so it makes a line of rainbow turtles.

Flake

My dad helped me make this code. In it, draw_wedge() is a function that calls itself.

Diamonds

This code uses the same draw_wedge() function to draw a cooler shape!