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:

Iteration (while loops)

Repeating code until a condition is met - validation, menus, and games.

Never done this before? Learn it first →

EasyIteration (while loops)
Age Verification Challenge
Write a program that asks for your age. If you are over 18, it outputs the message β€œOver 18”, otherwise it outputs β€œUnde
EasyIteration (while loops)
Compound Interest Calculator
Write a program that calculates the growth of a savings account with compound interest until a desired balance is reache
EasyIteration (while loops)
Maximum Number Finder
Write a program to display the larger of two numbers entered by the user.
EasyIteration (while loops)
Menu Selection Challenge
Write a program that presents a simple menu to the user: 1. Play Game 2. Instructions 3. Quit. The program should keep a
EasyIteration (while loops)
Nitrate Dose Calculator
Write a program that calculates the correct dose of nitrate based on the nitrate level entered by the user.
EasyIteration (while loops)
Portfolio Score Evaluator
Write a program that inputs a mark for each section of a project and calculates the total score, grade, and how many mor
EasyIteration (while loops)
Reverse Number
Create a program that reverses a given number using a while loop.
EasyIteration (while loops)
Sum of Digits
Implement a program that calculates the sum of digits of a given number using a while loop.
EasyIteration (while loops)
Test Score Grader
Write a program that allows you to enter a test score out of 100. The program outputs β€œFAIL” for a score less than 40, β€œ
EasyIteration (while loops)
Water Temperature Indicator
Write a program that reads in the temperature of water in degrees Celsius and displays a message stating whether the wat
MediumIteration (while loops)
Bank Balance Checker
Write a program that shows the user's balance, asks how much they want to withdraw, ensures it's a valid amount, and the
MediumIteration (while loops)
Gamertag Validator
Write a program that asks the user to enter a gamertag. The program should keep asking for a valid gamertag (less than 1
MediumIteration (while loops)
Power Calculator
Develop a program that calculates the power of a number using a while loop.
MediumIteration (while loops)
Prime Number Checker
Write a program that checks if a given number is prime using a while loop.
HardIteration (while loops)
Rock Paper Scissors Game
Write a program to play a game of rock-paper-scissors. The game continues until one player reaches 10 points.
EasyIteration (while loops)
Validate a Positive Number
Keep asking until the user enters a number greater than 0.
EasyIteration (while loops)
Password Validator
Use a while loop for input validation until correct password is entered.
MediumIteration (while loops)
Number Guessing Game
Implement a guessing game with while loop, random number, and feedback.
MediumIteration (while loops)
Menu-Driven Calculator
Create a menu system using a while loop that repeats until user quits.
EasyIteration (while loops)
Input Range Validator
Validate user input falls within a range using a while loop.
MediumIteration (while loops)
Shopping List Builder
Build a shopping list using a while loop with a sentinel value to stop.
MediumIteration (while loops)
Running Total Till
Use a while loop to keep a running total until a sentinel value of 0.
EasyIteration (while loops)
Dice Roll Until Six
Use a while loop with random to simulate rolling until a six appears.
HardIteration (while loops)
Quiz Retry System
Implement a quiz with retry logic, score tracking, and play-again option.