Question: ONE Python source file . 1. Converting numbers to Roman Numerals (some of them, not all). Ask the user for his or her name, A
ONE Python source file.
1. Converting numbers to Roman Numerals (some of them, not all).
Ask the user for his or her name,
A number between 1 and 10.
If the number entered by the user is not a valid number (between 1 and 10, inclusive), issue an error message and display the users name.
If the number is valid, display the corresponding Roman numeral number and the users name.
2. Dont be intimidated by the Math for this question! The process of calculation is simple. We dont need to know anything about the Zillers rule to write this program. Mr. Ziller developed a formula to calculate the day of the week. You tell the formula what it needs, it comes back with the day of the week. Make sure the prompts are very descriptive.
H = (q + 26(m+1)/10 + k + k/4 + j/4 + 5j) % 7
H is the calculated day of the week. 0: Saturday, 1: Sunday, ... 6: Friday. Your programshould output the name of the day and not the number.
q is the day of the month (1-31)
m is the month number (3: March, 4: April, ..., 12: December). January and February are counted as month 13 and 14 of previous year.MAJOR HINT: For January, your code must convert the user input to 13 and for February, your code must convert the user input to 14 and change the year to the previous year in both cases. I see a couple of nice and short if statements here.
j is the century (year / 100)
k is the year of the century (year % 100)
Note that the division in the formula should be integer division. Otherwise, the formula wont
Ask the user to enter a year, month number (m), and day of the month (q). Make sure to ask for the values in the given order.
f the month number is not a valid number between 1 and 12, issue an error message and do no not report the day of the week.
If the day of the month is not a valid number between 1 and 31, issue an error message and do no not report the day of the week.
Calculate and display the name of the day of the week.
Sample interaction
Please enter your name. Bob
Please enter a whole number from 1-10. 5
Your name is Bob.
Your Roman Numeral is V
Please input year. 2015
Please input month. (1-12) 1
Please input day of the month. (1-31) 25
Sunday
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
