March 2026
📚
Strings
Challenge Instructions
With May/June exams approaching, we will look at a topic that is commonly asked, particularly at A-Level - strings
The challenge is to take the following words from the dictionary and do some processing on this - examples could include:
- Find the longest word
- Output the count of each letter in the alphabet - what is the most common letter?
- Output the count of each word length - what is the most common word length?
- Output all words that start and end with the same letter
- Find all words whose letters appear in alphabetical order - e.g. "ace", since "a" is before "c" in the alphabet and "c" is before "e"
- Find all palindromes - words that are the same forward and backwards - e.g. "kayak"
- Find all words that contain all 5 vowels
- Find the word which repeats any letter the most - e.g "lullaby" has a count of 3, since "l" is repeated 3 times
- Calculate a word's scrabble score - output all words that score over 20 points
- Output all words that can be made from a given list of letters - e.g. "a", "e", "t" could make "ate", "eat", "tea"
You could also think of your own challenges - e.g.
- Check if a substring exists within a string
- Reverse a string
- Convert a sentence to tOgGlE/camelCase/PascalCase
- Count occurrences of a substring in a string
- Split a string based on a separator
- Convert a string to uppercase/lowercase without using the built-in case-conversion functions provided in the syllabus
- Check if a string contains all uppercase (or lowercase) letters
- Convert up to 3 digit numbers to their word equivalent - e.g. 123 would be "one hundred and twenty three"
...etc - there are many different examples you can think of
As a target, let's try and have 10 programs submitted by members of the community for others to look at...good luck...and have fun!
Top Submissions
Submission Instructions
Create your program on the editor page, then click the upload button at the bottom of the code editor as shown below
Once you are confident your program is working well without obvious bugs, then give it a relevant name, choose the current monthly challenge from the dropdown box, choose some program categories if you want and submit it :)
Note: your submitted programs will be in blue and you can overwrite them by opening them, clicking the upload button again and selecting "overwrite"