a program to solve a problem based on perimeter
The original problem came from the n-rich website. The idea was for children to work out how many rectilinear shapes could be drawn with a given unit for their perimeter. I thought it would be fun to get a Python program to do it and use turtle graphics to prove it.
I worked out what was going on mathematically first of all on paper, and then coded it. My first effort used camelCase for functions because I hadn't realised that Python tends to use snake_case instead!
Getting the proof using turtle was the fun part. I started off with a fairly straight way of doing it, but then thought about how I teach my students to think differently and to be creative with how they solve problems and present their work. So, I thought differently and rotated the turtle to make (in my opinion) a more interesting visual for my students to look at.
I tested this program by letting my Year Three students play with it. Fortunately, they loved it!