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 (for loops)
Repeating code a set number of times using for loops and range().
Countdown Bottles Challenge
Write a program that prompts the user to enter a number of bottles, then counts down from that number to zero with a rep
Multiplication Table
Write a program that prompts the user to enter a number, and then outputs the multiplication table for that number up to
Number Squares Challenge
Write a program that outputs the squares of numbers from 1 to 20.
Sum of Natural Numbers
Write a program that calculates the sum of natural numbers up to a given limit using a for loop.
Factorial Calculator
Write a program that calculates the factorial of a given number. The factorial of a non-negative integer n, denoted by n
Print Pattern
Develop a program that prints a specific pattern using a for loop.
Print Prime Numbers
Create a program that prints all prime numbers up to a given limit using a for loop.
FizzBuzz
Write a program that outputs numbers from 1 to 100. For multiples of three, output "Fizz"; for multiples of five, output
Prime Number Generator
Write a program that generates and displays all prime numbers within a specified range. A prime number is a natural numb
Random Math Quiz
Write a program that asks the user ten random math questions and tells them if they are correct. At the end, output how
Vertical Name Banner
Loop through a name one character at a time and print each letter on its own line.
Star Rating Display
Use a for loop with range() to print star ratings.
Times Table Generator
Generate a times table using a for loop and range().
Class Average Calculator
Use a counting loop to total scores and calculate an average.
Countdown Timer
Create a countdown using range() with a negative step.
Name Letter Counter
Iterate through a string using a for loop to count specific characters.
Multiplication Grid
Use nested for loops to create a multiplication grid.
Fibonacci Sequence Generator
Generate Fibonacci numbers using a for loop with running values.
Shopping Receipt Totaller
Use a for loop to collect item prices and calculate running total.