Sample code part 3 of 3. If you add all of that to your code and use that choice function, it should make things easier to code, debug, be more resistant to invalid input, and look a bit nicer too. Have fun.