This chapter looks at Python for making geometrical shapes. A year on from Chapter 1, we are now using 3.7.2. In the story, the animal characters learn to make a circle and a square, by importing turtle graphics:
Input
Output
The story
With the graphics
The text
#Programmer and story: Beth Mead
#Date: Monday 4th March 2019
print("Chapter 2")
print()
print("A Geometry Lesson")
print()
print("Maisy was starting to learn lots about Python.")
print()
print("Her good friend Malika had been teaching her, when Malika wasn't at work.")
print("Malika worked as a substitute teacher in the local school. Maisy thought it was a great job.")
print()
print("Maisy was with Malika one morning when Malika had a phone call.")
print('Professor Twoot (the school owl headmaster) said, "Hello Malika. Miss Peckworth, the duck teacher of mathematics, has just called in sick. Can you please teach her class for her?"')
print('"Of course I can!" said Malika,"but what are they learning?"')
print('"Ah, um" Professor Twoot replied, "I believe they are doing Geometry."')
print()
print('A few minutes later Maisy and Malika were at the school. Maisy was about to head home, when Malika offered to let Maisy sit at the back of the class room, to watch Malika teach.')
print('"It will be great work experience," Malika assured her.')
print()
print('Malika started by taking the register.')
print('"Nibbles the Hamster?"')
print('"Hi, I mean here Miss"')
print('"Squeaky the Mouse?"')
print(''"That's me!"'')
print('"Lutro the Otter?"')
print(''"Etiam, that means 'yes' in Latin"'')
print('"Raymond the Peacock?"')
print('"Present"')
print('"Cinnamon the Pig?"')
print(''"She's ill miss."'')
print('"Kit the Rabbit?"')
print('"Yes miss"')
print('Olive the Lizard?')
print(''"I'm a Sand Lizard miss."'')
print('"Oh I am sorry! And Nutty the Squirrel?"')
print(''"Yes, yep, that's me, it's my name!"'')
print()
print("After a long lesson of questions and answers, Malika wanted to do something more fun.")
print('''Malika said,"My friend Maisy and I have been working on Python. We have been learning how to draw geometrical shapes.
Maisy, would you like to remind everyone how these look? How about a circle and a square?"''')
print()
import turtle
window = turtle.Screen()
turtle.bgcolor("mintcream") #background colour of the window