Haileybury pupils were recently set the task of completing two Train Tracks puzzles; puzzles that appear in The Times daily, which are a good test of logic and reasoning.
Fifth’s pupil Matthew, saw the puzzles and noticed that some were similar, so decided to have a go at writing a series of rules to solve them. Using these rules, Matthew was then able to transfer them into a staggering 1500 lines of code, ultimately creating a programme that can be used to solve other versions of the puzzles.
When asked about what code was used, Matthew said, “it’s written in the coding language of C++, the industry standard coding language and also regarded as one of the most complicated languages. I chose it because it is the fastest language when written well, since it doesn’t waste any time doing things for you.”
Coding is a useful skill that can be used in a variety of areas, but Matthew explained, “I mainly use code to help me when tackling mathematical problems, usually just in processing large amounts of data or when searching for numbers with specific properties.”