A Few More Things to Try

  • Party like it’s roman_to_integer 'mcmxcix'! Come on, you knew it was coming, didn’t you? It’s the other half of your roman_numeral 1999 method. Make sure to reject strings that aren’t valid Roman numerals.

  • Birthday helper! Write a program to read in names and birth dates from a text file. It should then ask you for a name. You type one in, and it tells you when that person’s next birthday will be (and, for the truly adventurous, how old they will be). The input file should look something like this:

    Christopher Alexander, Oct 4, 1936
    Christopher Lambert, Mar 29, 1957
    Christopher Lee, May 27, 1922
    Christopher Lloyd, Oct 22, 1938
    Christopher Pine, Aug 3, 1976
    Christopher Plummer, Dec 13, 1927
    Christopher Walken, Mar 31, 1943 ...

Get Learn to Program, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.