Simple code test that I was given as part of a job application