plotting a spaceship landing on the surface of a planet has landed a local pupil a win and a job.
Dunstan High School pupil Keel Davidson (14) is the winner of a programming challenge created by Greg Bodeker, of Bodeker Scientific.
Dr Bodeker said the challenge was to use the Python programming language to safely land a spacecraft carrying two astronauts on the surface of a planet — without the astronauts being scraped off the floor with a spatula.
‘‘This was a little problem I’ve been thinking about in my head for about 10 years — I’ve kept meaning to do it myself.’’
He decided to set it up as a competition for high school pupils, not only ‘‘as a bit of a challenge’’, but also to help identify emerging programming talent at Dunstan High School.
‘‘So you imagine a situation where you’ve got a two-tonne spacecraft, 100km above a planet. It has 1000kg of fuel on board.”
“It is a planet abit like Mars, so the gravity is about two-thirds of Earth’s gravity, and burning a kilogram of fuel gives you a certain amount of force.’’
The challenge was to write a strategy for burning fuel that could land the astronauts safely on the surface with as much fuel in the tank as possible, he said.
Four pupils took up the challenge and Keel was the winner, writing an algorithm that meant ‘‘he still had 354kg of fuel left in his tank’’, Dr Bodeker said.
Keel was modest about his success, but was pleased that as well as winning the competition he had been offered work at Bodeker Scientific.
He will be spending some time when not at school working at the local research company, learning Python code.
Programming was the one of the types of jobs he had been considering once he finished his schooling, he said.