Program 6 Date Manipulation and Roman Numerals Using the datetime and roman Modules You are to...
Fantastic news! We've Found the answer you've been seeking!
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$ 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:
Answer rating: 100% (QA)
To create the program according to the given specifications youll need to use Pythons datetime module to handle daterelated operations and the roman m... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
How do we solve labor problems? The government of the united states changes their position as regards the ever present conflict between labor and management. At one times, it tilts towards labor and...
-
This assignment reviews object-oriented programming concepts such as classes, methods, constructors, accessor methods, and access modifiers. It makes use of an array of objects as a class data...
-
In this programming assignment you will practice using ArrayLists, Inheritance and Polymorphism. You are to write a game called Magical Creatures War. You will do this by implementing a class called...
-
Consider an asset allocation problem with one risky asset and one risk-free asset .There are four investors .Each investor maximizes a mean-variance utility function to make their optimal investment...
-
Which are more successful in dislodging electrons from a metal surface: photons of violet light or photons of red light? Why?
-
The quantity theory of money explains the link between inflation and money growth. a. The equation of exchange tells us that: i. The quantity of money times the velocity of money equals nominal GDP....
-
If possible, subtract the following irrational numbers without using a calculator. If this is not possible, state why. \(3 \sqrt{7}-8 \sqrt{7}\)
-
In the spring of 2013 the Caswell Publishing Company established a custom publishing business for its business clients. These clients consisted principally of small- to medium-size companies in Round...
-
Merline Manufacturing makes its product for $70 per unit andsells it for $138 per unit. The sales staff receives a commissionof 10% of sales. Its December income statement follows. MERLINEMANUFACTU 2...
-
Jurisdiction B's tax system consists of a 6.5 percent general sales tax on retail goods and selected services. Over the past decade, the average annual volume of sales subject to this tax was $500...
-
10 Marked out of 100 legant A 2501 E /mod/q/ptplattempt 45159011349 dle FSEGA Anunt Evenimente Noua Linbani utile Tutor ng ENG 21-22 ing 21-22/ Exam / 1A Exam 25.01 10:00 EA, FBE MGE Te let 019 A...
-
What strategies are not appropriate for import and tariff quotas? a. Export to the same target market b. Develop products to export that will not be subject to quotas c. Produce goods and services in...
-
An investor forms a portfolio of two stocks, Alpha and Beta. Information regarding the two stocks is shown below: Stock Expected Return Alpha 6% Standard Deviation 25% 30% Bravo 8% The correlation...
-
whiuch oral hypoglycemic agent would be safest for an older patient if hypoglycemia is a mojor concern? tolbutamide glipizide metformin glimepiride
-
Consider: U.S. T-Bill return = 3% S&P 500 expected return = 10% Portfolio Beta = 0.5 Requirements (answer in the same order and indicate each question's number): 1. Calculate the market risk premium...
-
New Tek has a sustainable growth rate of 11.2 percent. However, the firm's managers are determined that the firm should grow by at least 20 percent next year. What must the firm do if the managers...
-
1 USD 4.84 Brazilian Reales 1 USD 528.87 Costa Rican Colones 1 Brazilian Real = 111.11 Costa Rican Colones n. Given the exchange rates above, calculate the shadow price between Reals and Colones. o....
-
Cable Corporation is 60% owned by Anna and 40% owned by Jim, who are unrelated. It has noncash assets, which it sells to an unrelated purchaser for $100,000 in cash and $900,000 in installment...
-
Ann hires a nanny to watch her two children while she works at a local hospital. She pays the 19-year-old nanny $125 per week for 48 weeks during the current year. a. What is the employer's portion...
-
Indicate, in each of the following situations, the number of exemptions the taxpayers are entitled to claim on their 2012 income tax returns. Number of Exemptions a. Donna, a 20-year-old single...
-
Quince Corporation has taxable income of $450,000 for its 2012 calendar tax year. Calculate the corporation's income tax liability for 2012 before tax credits. $_________
-
Daniel Charon is the loan officer of the Georgian Bay Bank. Georgian Bay Bank has a loan of \($540,000\) outstanding from Regional Delivery Service Ltd., a company specializing in the delivery of...
-
For each of the following quality control procedures taken from the quality control manual of a medium-sized regional public accounting firm, identify the applicable element of quality control from...
-
In light of recent business failures, the public has expressed concern about the usefulness of the financial statement audit and the auditor's report. Because of these concerns, the accounting...
Study smarter with the SolutionInn App