Skip to content

Python challenges

Python coding challenges for GCSE

Fifteen exam-style programming challenges in three levels. Try each one, then check the hint if you are stuck.

Python code on a screen

How to use these challenges

Work through each level in order. Write the program, then test it with normal, boundary and erroneous data. Only open a hint after a real attempt. These match the kind of programming skills GCSE papers test.

Level 1: warm up

  1. Even or odd: ask for a number and say whether it is even or odd. Hint: use % 2.
  2. Biggest of three: ask for three numbers and output the largest. Hint: if and elif, or max().
  3. Countdown: count down from any number to 1, then print “Lift off”. Hint: range(n, 0, -1).
  4. Times table tester: ask ten random questions and give a score. Hint: random.randint.
  5. Temperature converter: Celsius to Fahrenheit. Hint: F = C × 9 / 5 + 32.

Level 2: strings and lists

  1. Vowel counter: count the vowels in a sentence. Hint: loop through each character and check “in "aeiou"”.
  2. Palindrome checker: is a word the same backwards? Hint: word[::-1].
  3. List average: enter ten scores into a list and output the average, highest and lowest. Hint: sum(), len(), max(), min().
  4. Username generator: first three letters of the surname plus year of birth. Hint: string slicing.
  5. Validation loop: keep asking for an age until it is between 11 and 18. Hint: a while loop.

Level 3: exam style

  1. Linear search: search a list for a name without using “in”. Output its position or “Not found”.
  2. Bubble sort: sort a list of numbers without using sort(). See the cheat sheet.
  3. Login system: three attempts to enter the correct username and password.
  4. Two-dimensional list: store three students' scores on three tests and output each student's total.
  5. File reader: read names from a text file and write them, sorted, into a new file.

Test like an examiner

Test dataExample for an age between 11 and 18
Normal14
Boundary11 and 18 (accepted), 10 and 19 (rejected)
Erroneous“fourteen”, -5

Questions

Common questions

Are answers provided?

Hints are given so students do the thinking. In one to one lessons Dee goes through model solutions and why they work.

Which level should my child start at?

Start at Level 1, even if it seems easy. Fast, accurate basics matter under exam pressure.

Do these work for AQA, OCR and Edexcel?

Yes. The skills are common to all boards.

Want help with this one to one?

Dee replies personally to every enquiry, usually within two working days.

Send an enquiry