Python Programming Challenges

292 free challenges for GCSE Computer Science students. Perfect for OCR and AQA students looking to practise Python programming, or anyone who wants to sharpen their coding skills.

๐Ÿ“ Edexcel students? Practise Paper 2 challenges here
☰ Browse by Topic
Difficulty:

Functions & Procedures

Writing reusable code with def, parameters, and return values.

Never done this before? Learn it first →

MediumFunctions & Procedures
Dart Score Keeper
Write a program that keeps track of a player's score in a darts game, subtracting each turn's score from the total.
MediumFunctions & Procedures
GCD Calculator
Implement a function that calculates the greatest common divisor (GCD) of two numbers.
MediumFunctions & Procedures
Measurement Converter
Write a program that provides a utility for converting between metric and imperial measurements. Each conversion should
HardFunctions & Procedures
Pig Dice Game
Write a program that plays the Pig Dice game, where players take turns rolling dice to accumulate points but risk losing
EasyFunctions & Procedures
Function: Return the Larger
Write a function that returns the larger of two numbers, then use it.
MediumFunctions & Procedures
Sports Day Scoreboard
Write the printing once as a subroutine, then call it for each house instead of repeating yourself.
EasyFunctions & Procedures
Parcel Weight Function
Write one subroutine that returns a value and one that only prints, so the difference is obvious.
EasyFunctions & Procedures
Shelf Space Scope
Read a global constant from inside a subroutine, do the working out in a local variable, and return the answer.
EasyFunctions & Procedures
Greeting Procedure
Create a procedure that displays a greeting message using parameters.
EasyFunctions & Procedures
Area Calculator Function
Create a function that calculates area and returns the result.
MediumFunctions & Procedures
Validation Function
Create a reusable validation function with parameters for min and max.
MediumFunctions & Procedures
Discount Calculator Function
Create a function that calculates discounted prices with multiple parameters.
MediumFunctions & Procedures
Temperature Category Function
Create a function that returns a temperature category string.
HardFunctions & Procedures
Multi-Function Calculator
Build a program using multiple functions and procedures working together.
HardFunctions & Procedures
Password Generator Function
Create a function that generates passwords with configurable length.
HardFunctions & Procedures
List Statistics Function
Write functions that process a list parameter and return calculated statistics.