Chapter 1

Chapter 1: Addition and Times Tables

Download the Python 3.6.5 file (imported into 3.7.2.) here

Using Python 3.6.5 (See the small text in the top bar of the file below), Beth created a children’s story which introduced her charming animal characters, Maisy and Malika, to Addition and Time Tables within a classroom scenario. This process is further explained on this website, with hints for teachers (See Introduction and Teachers’ Notes.)

It is a creative, cross-curricular project, so far involving:

· English (Writing short stories, including very careful punctuation!)

· Maths (Addition, Times Tables, Geometry – and we hope to add graphs later)

· Computing (Using Python coding, as a second coding language after Scratch)

· ICT (File management as part of Computing)

· And more to come (Art, Geography, Music….)

This is how Beth started, from a blank Python 3.6.5 Shell page:

Beth used the print text facility in Python to make the following short story chapters. It shows how Python sub-routines (a table, table = int) can be imported and used within a story-telling context. The text appears within the brackets in green, and “prints out” as blue.

table = int(input("The 7 times table is one of the hardest. Let's try to make the 7 times table, and see what happens! Put the number 7 in and press Enter..."))

for x in range(1,13):

print(x, "x", table, "=", x*table)

This is actually much easier than it looks!

So, she wrote the following story, called “Finally”, ( while still in Primary school, Year 6, aged 11. It later became “Chapter 1” of the current larger computer coding project, “Literacy from Python”, i.e. writing short stories created by using Python.

Double brackets () create a blank line in the text.

When saved, named, and Run the start of the story looked like this:

At the cursor

type in the number you wish, in this case, 7.

And if a different number, in black above, is typed in, you get a different Times Table!

We thought this was fun!

Note: Brackets and speech marks must be typed very carefully!

(As a retired English teacher, I am not at all unhappy about this….)

And this is the text:

#Programmer and story: Beth Mead

#Date: Monday 26th February 2018,15:56



print("(Or, how to use 'Python' for story-telling)")


print("Maisy, the Spaniel, was walking past the school.")


print("Hearing the word 'Python', she wondered why the pupils were talking about snakes!")

print("She also heard the words 'Times Tables', and wanted to know more.")

print("So, she went to see her wise friend Malika, the cat.")

print('''Malika explained: "It's not a python, it's 'Python', a computer program. It is named after a famous TV comedy show"''')

print("Maisy wanted to learn about Python, so Malika showed her how to download the free computer program into her computer.")

print("Maisy noticed that different words went different colours depending on what words were used.")

print("Maisy went back to Malika and asked what had happened.")

print("Malika told her that each colour meant something different: 'print' is pinky/purple because it is a function; words in brackets'()' and inverted commas'' are green because they are strings.")

print("Even though Malika is very wise, she didn't know what a function was.")

print("Maisy knew that a function is a task that the computer carries out, such as print, or run, and shared her knowledge with Malika.")


print("Maisy was playing about and found that Python could also calculate numbers. Maisy remembered that the pupils were talking about Times Tables.")

print("She went back to Malika to ask if Python could do Times Tables. Malika showed Maisy how to make them.")


table = int(input("The 7 times table is one of the hardest. Let's try to make the 7 times table, and see what happens! Put the number 7 in and press Enter..."))

for x in range(1,13):

print(x, "x", table, "=", x*table)


print("Maisy wondered why you put 13 for _ x 12. Malika didn't know, but said she would find out later. A sort of traffic light before a road junction?")


print("Maisy next wondered if Python could help her with a guessing game.")

print(''''Can you guess how many pupils there are in the class?' asked Maisy.''')

print("I will guess there are 28 pupils.")


print("28? No. A couple more than this.")


print(28 +2)


print("Well done!")


print("Maisy said, 'Now I know what the pupils were talking about when I passed the school. Python is a really useful snake! I mean, computer program!'")

We hope this helps! - Lawrence and Beth

Now look at Chapter 2 on Geometry! This was created a year later (2019) using Python 3.7.2. simply because we were busy with other coding projects, not through lack of interest…