How it works
- Choose an option below: code-breaking puzzles (no coding needed) or Python challenges. You can do both.
- Open Submission Form, choose the correct challenge and submit your answer.
- A teacher checks every answer, so points appear on the leaderboard once yours has been marked, not straight away. Only your first correct answer to each challenge scores.
- Easy is worth 10 points, Medium 25 and Hard 50, and every point counts for your house. The event runs from Monday 12 to Friday 16 October, with new challenges unlocking at 15:30 each afternoon.
.sort(), sorted(),
.reverse(), [::-1], max(), min(), Counter,
and similar built-ins. They're great tools in real life, but they make these particular challenges too easy!
Day 1 — Fundamentals
Write a function `is_even(n)` that returns `True` if `n` is even, and `False` otherwise.
is_evenWrite a function `max_of_three(a, b, c)` that returns the largest of the three numbers.
max_of_threeWrite a function `reverse_string(s)` that returns the string `s` reversed.
reverse_stringWrite a function `fizzbuzz(n)` that returns a list of strings for the numbers 1 to n (inclusive). For multiples of 3, use "Fizz". For multiples of 5, use "Buzz". For multiples of both, use "FizzBuzz". Otherwise, use the number itself, as a string.
fizzbuzzWrite a function `count_vowels(s)` that returns the number of vowels (a, e, i, o, u) in `s`, ignoring case.
count_vowelsWrite a function `is_prime(n)` that returns `True` if `n` is a prime number, `False` otherwise. Remember: numbers less than 2 are not prime.
is_primeDay 1 — Shifting letters
Every letter in this message has been shifted 3 places forward in the alphabet (so A became D). Shift each letter back 3 places to read it.
Same idea, but this time the shift is a secret. Try shifting back by 1, 2, 3 and so on until real English appears.
Decode this message (the shift is a secret again). It's a riddle, so work out the answer to it.
Day 2 — Strings & Lists
Write a function `sum_list(nums)` that returns the sum of a list of numbers.
sum_listWrite a function `find_max(nums)` that returns the largest value in a non-empty list.
find_maxWrite a function `capitalize_words(s)` that capitalizes the first letter of every word in `s`. Words are separated by single spaces.
capitalize_wordsWrite a function `remove_duplicates(nums)` that returns a new list with duplicate values removed, keeping only the FIRST occurrence of each value, in original order.
remove_duplicatesWrite a function `is_palindrome(s)` that returns `True` if `s` reads the same forwards and backwards, ignoring case and spaces.
is_palindromeWrite a function `caesar_cipher(s, shift)` that shifts every letter in `s` forward by `shift` places in the alphabet, wrapping around from z to a. Preserve the case of each letter, and leave non-letter characters (spaces, punctuation) unchanged.
caesar_cipherDay 2 — Numbers & bits
Each number stands for a letter: A=1, B=2, C=3 ... Z=26. A slash (/) separates words.
Each block of 8 binary digits is one letter. A is 01000001, B is 01000010, C is 01000011 and so on, counting up in binary.
Each pair of characters is a hex (base 16) number, and each number is one letter. Hex counts 0-9 then A-F, and 41 is A, 42 is B, so after 49 comes 4A.
Day 3 — Patterns & Practice
Write a function `double_values(nums)` that returns a new list with every number in `nums` doubled.
double_valuesWrite a function `count_occurrences(nums, target)` that returns how many times `target` appears in the list `nums`.
count_occurrencesWrite a function `sum_of_squares(nums)` that returns the sum of the squares of every number in `nums`.
sum_of_squaresWrite a function `average(nums)` that returns the average of a list of numbers, rounded to 2 decimal places.
averageWrite a function `second_largest(nums)` that returns the second largest DISTINCT value in the list.
second_largestWrite a function `run_length_encode(s)` that compresses a string by replacing runs of the same character with the count followed by the character. For example, three a's in a row become "3a". Assume `s` only contains letters (no numbers).
run_length_encodeDay 3 — Classic codes
Decode this Morse code. A slash (/) separates words.
Show the Morse chart
A .- B -... C -.-. D -.. E . F ..-. G --. H .... I .. J .--- K -.- L .-.. M -- N -. O --- P .--. Q --.- R .-. S ... T - U ..- V ...- W .-- X -..- Y -.-- Z --..
The message was written in a zigzag across two rows, then read off row by row. For example HELLO gives HLO on the top row and EL on the bottom, so it becomes HLOEL. Decode this one (spaces were removed, so put them back).
This is a Vigenere cipher with the key BIST. The first letter is shifted by B (1 place), the second by I (8), the third by S (18), the fourth by T (19), then the key repeats. Spaces don't use up a key letter. The answer is the name of a famous codebreaker.
Day 4 — Number Puzzles
Write a function `factorial(n)` that returns n! (n factorial). Assume n >= 0.
factorialWrite a function `is_sorted(nums)` that returns `True` if the list is sorted in ascending order, `False` otherwise. An empty list or single item counts as sorted.
is_sortedWrite a function `is_leap_year(year)` that returns `True` if `year` is a leap year. A year is a leap year if it's divisible by 4, EXCEPT years divisible by 100 are not leap years, UNLESS they're also divisible by 400.
is_leap_yearWrite a function `gcd(a, b)` that returns the greatest common divisor of two positive integers.
gcdWrite a function `fibonacci(n)` that returns the nth Fibonacci number (0-indexed), where fibonacci(0) = 0 and fibonacci(1) = 1.
fibonacciWrite a function `binary_search(nums, target)` that returns the index of `target` in the SORTED list `nums`, or -1 if it isn't there.
binary_searchDay 4 — Logic & grids
Find the pattern and type the next number in the sequence.
Each pair of digits is a row then a column in this grid, so 21 means row 2, column 1.
1 2 3 4 5 1 A B C D E 2 F G H I K 3 L M N O P 4 Q R S T U 5 V W X Y Z (I and J share a square)
Exactly one of these four suspects deleted the file, and exactly one of the four statements is true. Who did it?
Day 5 — Grand Finale
Write a function `flatten_one_level(nested)` that takes a list of lists and returns a single flat list. For example, [[1, 2], [3], [4, 5]] becomes [1, 2, 3, 4, 5].
flatten_one_levelWrite a function `sum_digits(n)` that returns the sum of the digits of a non-negative integer `n`.
sum_digitsWrite a function `reverse_words(sentence)` that reverses the ORDER of words in a sentence (the words themselves stay spelled normally). For example, "hello world" becomes "world hello".
reverse_wordsWrite a function `char_frequency_max(s)` that returns the character (ignoring spaces) that appears most often in `s`. If there's a tie, return whichever of the tied characters appears first in the string.
char_frequency_maxWrite a function `matrix_transpose(matrix)` that returns the transpose of a 2D list (rows become columns).
matrix_transposeWrite a function `is_valid_parentheses(s)` that returns `True` if every bracket in `s` (made up of "()[]{}") is properly opened and closed in the right order.
is_valid_parenthesesDay 5 — Finale
There's a word hidden in this poem. Read the first letter of each line.
The alphabet has been mirrored: A swaps with Z, B with Y, C with X, and so on. Decode the message.
Each clue hides one letter, and the five letters spell the answer in order. One clue each uses A1Z26, binary, Caesar (shifted 3 places forward), hex and Morse code. They are listed alphabetically here, not in clue order, so work out which is which.
Top Hackers
🔥 5-Day Streak (solved something every day, +20 pts) · 🧹 Clean Sweep (all 3 Easy Python challenges in one day) · 🔐 Code Breaker (all 3 puzzles in one day) · 🥇 Trailblazer (first correct solve of the whole event)
| # | Name | House | Points |
|---|
No points on the board yet — check back soon!
House Rankings
| # | House | Points |
|---|