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.
☰ Browse by Topic
Iteration (while loops)
Repeating code until a condition is met - validation, menus, and games.
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
Compound Interest Calculator
Write a program that calculates the growth of a savings account with compound interest until a desired balance is reache
Maximum Number Finder
Write a program to display the larger of two numbers entered by the user.
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
Nitrate Dose Calculator
Write a program that calculates the correct dose of nitrate based on the nitrate level entered by the user.
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
Reverse Number
Create a program that reverses a given number using a while loop.
Sum of Digits
Implement a program that calculates the sum of digits of a given number using a while loop.
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, β
Water Temperature Indicator
Write a program that reads in the temperature of water in degrees Celsius and displays a message stating whether the wat
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
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
Power Calculator
Develop a program that calculates the power of a number using a while loop.
Prime Number Checker
Write a program that checks if a given number is prime using a while loop.
Rock Paper Scissors Game
Write a program to play a game of rock-paper-scissors. The game continues until one player reaches 10 points.
Validate a Positive Number
Keep asking until the user enters a number greater than 0.
Password Validator
Use a while loop for input validation until correct password is entered.
Number Guessing Game
Implement a guessing game with while loop, random number, and feedback.
Menu-Driven Calculator
Create a menu system using a while loop that repeats until user quits.
Input Range Validator
Validate user input falls within a range using a while loop.
Shopping List Builder
Build a shopping list using a while loop with a sentinel value to stop.
Running Total Till
Use a while loop to keep a running total until a sentinel value of 0.
Dice Roll Until Six
Use a while loop with random to simulate rolling until a six appears.
Quiz Retry System
Implement a quiz with retry logic, score tracking, and play-again option.