Skip main navigation

Moving from Scratch to Python

Last year I allowed each student to set their own pace, whilst offering advice about which projects I thought would be suitable for them. I love Scratch, but kids can get ‘over-Scratched’ after a while, and even a simple Python program can give them a great sense of achievement.
Case Study Code Club Leader

Darren Townsend, Code Club leader at Southwold Primary and Nursery School, details how he helps the pupils in his club move from Scratch to Python.

I’ve been running after-school computing clubs for a couple of years and a Code Club for 18 months. I started with lunchtime sessions, introducing Raspberry Pi to our Digital Leaders group of students, and this led on to starting an after-school physical computing club.

This year I have made some changes to keep it fresh for both the kids and myself. Currently, we run a Scratch-based Code Club on Tuesday and a Python-based Code Club on Thursday. Both of these sessions are a combination of coding and physical computing, using PCs, Raspberry Pis, and micro:bits. Last term I had 23 students (aged 7–11) attending.

Moving From Scratch to Python

The pupils really enjoy beginning their learning with the Scratch Code Club projects. The Year 3 and 4 kids (aged 7–9) tend to like the Ghostbusters and Chatbot projects. Boat race is a big favourite with Year 5 (age 10), and the more advanced students have a go at Create your own world. By Year 6 (age 11), most of the pupils have made the transition to Python, with Robo-Trumps and RPG being favourites for those that are learning this language. I think Rock, paper, scissors is an especially is a great introduction to Python.

Starting in Scratch

I find that Scratch has very few barriers to learning. Last year I was asked to run coding sessions during Maths Week, so I wrote some resources based around 2D shapes and repetition. One of the sessions had a mix of Year 2 and 3 students, and none of them had seen Scratch before. After only ten minutes, they had all got the hang of locating and assembling the blocks to make a program.

The only thing that some kids struggle to get immediately is variables. I think this is because you have to create the variable first before the blocks appear, which takes practise. Differentiating between sprites and costumes is another really common mistake.

One of the early challenges that we had was making Code Club projects accessible to children with special educational needs (SEN), especially those suffering from dyslexia or a similar condition. The online learning resources were not easy for this group of students, due to the challenges presented by the black-on-white contrast, and having to transfer information when toggling between tabs. I work closely with our SEN coordinator to tackle these problems. At the start of each new term, she goes through my club member lists and gives me information on any students that may have additional needs, as well as strategies to help them to enjoy Code Club. The issues with the resources were actually solved in a very low-tech way: we printed them out on pastel-coloured paper, and it worked like magic!

Moving to Python

Last year I allowed each student to set their own pace, whilst offering advice about which projects I thought would be suitable for them. I love Scratch, but kids can get ‘over-Scratched’ after a while, and even a simple Python program can give them a great sense of achievement. In the larger club last year, the 23 students were all doing different projects: the younger ones used Scratch, whilst most of the older ones worked their way through Python, as well as helping the younger ones at times. This year we are sticking together a bit more, using challenges and stretch goals to push the more advanced students.

First Python Experiences

Python is a bit of a shock at first, due to the lack of pretty graphics! Apart from this, most of the issues the students face come down to typing skills. However, I find they soon learn where the most frequently used characters are on the keyboard. Indenting can be confusing at the start, but I remind learners that Scratch uses indenting too: in Repeat and Forever loops. I use comparisons of Scratch to Python at the beginning, for example to explain that while True is the same as the Forever block. I also have some Python cheat sheets which give examples of common Python code.

The pupils really enjoy the fact that Python is ‘proper’ coding. Some of them find it easier to debug Python than Scratch, because Python gives you error messages to indicate what went wrong. It’s usually down to typing errors!

Tips When Moving From Scratch to Python

In our physical computing clubs, I use a simple reaction game to introduce a range of concepts. It uses two buttons and two LEDs. Here are the pseudocode steps for it:

  • Green LED on
  • Wait random time
  • Red LED on
  • Wait for button press
  • Fastest finger wins!

We start off in Scratch with the basic code (which involves sequencing and conditionals), then introduce rounds (repetition), and scoring (variables). When the students are ready for Python, we go through the Scratch code and convert it to Python, one concept at a time. The resulting Python code has a very similar size and structure to the original in Scratch.

I think my number one tip is to use something that the kids are already familiar with and convert it. It means they already know what the end result should be, and it makes it seem less like they are having to start, well, from scratch!

This article is from the free online

Scratch to Python: Moving from Block- to Text-based Programming

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now