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
Exception Handling
Handling errors gracefully with try and except.
Division Calculator
Write a program that asks the user to enter two numbers and divides the first by the second. Handle cases where the user
Calculation Parser
Write a program that allows the user to enter a calculation in the format "16 + 8". The program should parse the input a
Change Calculator
Write a program that calculates the correct change to be given by a vending machine using the fewest number of coins.
Safe Number Entry
Use try and except so the program does not crash when the user types letters.
Keep Asking Until Valid
Keep prompting with try and except until the user enters a valid whole number.