Challenge 2 from Swift Coding Challenges by Paul Hudson