Program 6 Date Manipulation and Roman Numerals Using the datetime and roman Modules You are to write a program…

Program 6 Date Manipulation and Roman Numerals Using the datetime and roman Modules You are to write a program…

Question:

Transcribed Image Text:

Program 6 Date Manipulation and Roman Numerals Using the datetime and roman Modules You are to write a program which uses the Python datetime and roman modules. Videos that I placed in Blackboard that will be helpful for this assignment are: Python_pip_Command Python_roman_module Python_datetime_module Your program should prompt the user for a birth date in the form mm/dd/yyyy and output the person’s birth date and “exact” age in both “normal” and “roman” format. Since most of us probably do not know exactly what time of day we were born, we will not calculate our age down to, or display any information related to, hours, minute and seconds. The output should be similar to that shown on Attachment A. General Requirements You should check to see if the information inputted by the user is correct in format. If it is not, you should output an appropriate error message and have the program terminate. Your program should accept 1 or 2 digit months and 1 or 2 digit days. (Examples of valid input are 01/03/2001, 1/3/2001, 10/5/1960, etc.) If the user specifies a birth data that is in the future, your program should output an appropriate error message and terminate. Normal Terms When outputting a person’s birthday date you are to output the month as January, February, March, etc. instead of the numeric value that was inputted by the user. If the day of birth had a leading zero, do not output the leading 0. If this is the case, there should not be extraneous spaces in the output. (For an example, see the first execution shown in Attachment A) When outputting the person’s age you should specify the number of years, months, weeks, days (do not include hours, minutes, or seconds). Also, if the any of these values is zero, you should not output them. (For an example, see the third execution shown on Attachment A). Roman Terms All numeric values are to be displayed as roman numerals. All zero values in the age output should be omitted. The information related to the month of birth should come from this table: Month of Birth January February March April May June July August September October November December Outputted Information Januarius (Named after the god Janus) Februarius (Named after Februa, the purification festival) Martius (Named after the god Mars) Aprilis (Named after the goddess Aphrodite) Maius (Named after the goddess Maia) Junius (Named after the goddess Juno) Julius (Named after Julius Caesar in 44 BC. Quintilis previously) Augustus (Named after Emperor Augustus in 8 BC. Sextilis previously) September (From the word septum, meaning 7) October (From the word octo, meaning 8) November (From the word novem, meaning 9) December (From the word decem, meaning 10) Test Cases You must run your program for the two dates shown in Attachment A, your birth date, and then run any other additional test cases you may need to demonstrate that all portions of your program function properly. Additional Information To output the date on which your program is executed, and to calculate a person’s age, you will need the current date which can be obtained via the datetime now() method or the UNIX date command. When displaying the date on which your program is executing DO NOT display the current time. Attachment A wbeech0001@grace$ pgm6.pl This program is being run on Mar 25, 2001 Input a birthdate in the form mm/dd/yyyy: 10/05/1960 In “normal” terms: The person was born October 5, 1960 The person is 40 years 5 months 2 weeks 6 days old In “Roman” terms: The person was born on the V day of the month named October (From the word octo, meaning 8) in the year MCMLX The person is XL years V months II weeks VI days old wbeeche001@grace$ pgm6.pl This program is being run on Mar 25, 2001 Input a birthdate in the form mm/dd/yyyy: 3/8/1938 In “normal” terms: The person was born March 8, 1938 The person is 63 years 2 weeks 3 days old In “Roman” terms: The person was born on the VIII day of the month named Martius (Named after the god Mars) in the year MCMXXXVIII The person is LXIII years II weeks III days old wbeech0001@grace$ pgm6.pl This program is being run on Mar 25, 2001 Input a birthdate in the form mm/dd/yyyy: 3/23/1980 In “normal” terms: The person was born March 23, 1980 The person is 21 years 2 days old In “Roman” terms: The person was born on the XXIII day of the month named Martius (Named after the god Mars) in the year MCMLXXX The person is XXI years II days old wbeeche001@grace$

Expert Answer: