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:

File Handling

Reading from and writing to text files.

Never done this before? Learn it first →

EasyFile Handling
File Appender
Develop a program that appends user input to an existing text file.
EasyFile Handling
File Writer
Create a program that writes user input to a text file.
EasyFile Handling
Product Catalog
Write a program that asks the user for a product code, description, and price, then saves the data in a serial file.
EasyFile Handling
Quote of the Day
Write a program that outputs a "quote of the day" stored in a text file.
MediumFile Handling
Character Counter
Implement a program that counts the number of characters in a given text file.
MediumFile Handling
Random Quote Generator
Enhance the previous program to output a random quote from a file containing multiple quotes.
HardFile Handling
Simple Quiz Game
Write a program that reads questions and answers from a text file and quizzes the user. Keep track of the score and outp
MediumFile Handling
Youth Club Register File
Open a file in write mode, save a numbered name on each line until the user finishes, then close it.
EasyFile Handling
Score File Writer
Write user data to a text file using the with statement.
EasyFile Handling
File Reader & Display
Read and display contents of a text file using readline() and readlines().
MediumFile Handling
CSV Data Processor
Read CSV data from a file, split by commas, and process the records.
MediumFile Handling
High Score Table
Append new scores to a file and read back the full high score table.
HardFile Handling
Stock File Updater
Read stock data from a file, update quantities, and write back.
HardFile Handling
Log File Analyser
Read and analyse a log file line by line, extracting specific data.