The Pearson / Edexcel GCSE in Computer Science has a practical on-screen python exam which assesses your ability to read, understand, write and debug python code. In the actual exam you won’t have access to the Internet but you will have a copy of the Programming Language Subset which is a really useful reminder and reference guide.
There are a variety of different question styles you might get in the third question of the Edexcel GCSE Computer Science paper 2:
- Code completion challenges where you have to fill in the blank spaces in code
- Instructions to turn a flowchart into python code
- Rearranging sections of code or choosing between multiple options for lines of code
This page has three practice Q3 style activities to help you prepare for the exam. In the actual exam you won’t be able to use an online IDE so these self marking activities are just designed to give you instant feedback as you practice and prepare for the exam. If you want to practice “offline”, you can download the questions and python files here:
The progress bar below shows how well you’ve done on each part of the three challenges. You can generate a PDF certificate to celebrate your progress if you click on the ✓ button next to where you enter your name.
Challenge 1: Fireworks
Suggested time: 20 minutes
A programmer is designing a program which should display an animated firework display.
Some of the lines of code in the program are mixed up. Some sections of the program include different options for lines of code and only one of the options should be included in the program. When the program is complete it should generate an animated fireworks display similar to the image below:
Using the file Q03.py below:
Amend the code to make the program work and produce the correct output.
You will need to rearrange some lines of code, choose between alternative lines of code and fill in some blank spaces.
Do not change the functionality of the given lines of code.
Do not add any additional functionality
If this was a real question it would tell you to save your code as Q03_FINISHED.py but you might want to save your code so you can show your teacher or come back to it later by pressing Ctrl + S or clicking on the icon that looks like this: