Question: 1. (25 points) Write a function that takes a single year value as input and outputs the number of full years that have passed since

1. (25 points) Write a function that takes a single year value as input and outputs the number of full years that have passed since 1 Jan. 0000 of the input year. For example, with 2018 as the input, 2018 should be the output.

2. (25 points) Write a function that takes a single month value (in the form of a number - 1 for Jan., 2 for Feb., etc.) as input and outputs the number of full months that have passed since 1 Jan. for the input month. For example, February (input = 2) should output 1, since the only full month to have passed would be January. Assume the user will input a number and not text to indicate the month.

(Hint: these are quite simple, but not quite the same. Be sure you think about what these functions output and that you agree with the numbers generated.)

3. (25 points) Write a function that takes as input a month (in the form of a number - as shown above) and a year and outputs the number of full months that have passed since 1 Jan. 0000 for the input month and year. For full credit, use the functions from 1. and 2. If you do not use those functions, you will still be given partial credit.

4. (25 points) Write a script OR function that prompts the user for their birth month (in the form of a number - as shown above) and year. The script/function must then calculate how many full months old the user is, and output it on the screen with some text, identifying what is being reported. For example: "You are 2,345,678 months old." For full credit, you must use the functions generated in 1. through 3. If you don't use them, you will still receive partial credit.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!