Question: USING PYTHON ONLY: Birthday Analyzer Note: This program does not require a while loop. Also, you are not allowed to use the sys.exit() function to

USING PYTHON ONLY: Birthday Analyzer

Note: This program does not require a while loop. Also, you are not allowed to use the sys.exit() function to cause your program to prematurely quit.

You have been hired by a reality show casting company to write a program that will be used to ensure that their contestants are at least 21 years of age by the start of a show.

Your task is to write a simple program that prompts the user to enter two values: the start date of a show and the birth date of a candidate. The user will enter dates using the following format: MMDDYYYY

Your program should then generate the following output: The candidates birthday in the following format: December 1st, 2000

Whether the candidate is eligible to be on the reality show or not. Eligible candidates must be 21 years of age or older as of the time of the taping of the show.

Here are some hints:

  • You can assume that the user will always enter a valid date using the MMDDYYYY format

  • To extract the year, month and day from a date it may be helpful to revisit some of the math operations we covered during Assignment #2

  • You will need to find a way to convert a numeric value (i.e. 10) into a month value (i.e. October). Hint: you may need a few if statements to do this!

  • Depending on the day of the month you may have to use a different label when printing the date (i.e. May 1st, May 2nd, May 3rd, May 4th, May 5th, May 21st, May 22nd, May 23rd and May 31st)

  • When computing the age of a candidate you should first look at your year values. If you can make a determination as to whether a candidate is eligible using this information then thats great! If not, you may need to look at the month and day values.

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!