Write a program to assess if the user can get vaccinated for COVID-19 and if so when based on the table below. Note, the table below is my own version of the eligibility criteria and has nothing to do with what the State has proposed. See sample runs below.
Criteria | Eligible | When? |
Health Care worker (Any age) | Yes | Now |
Underlying conditions (ages 65 and above) | Yes | April 1st |
Ages 65 and above (no underlying conditions) | Yes | April 15th |
Underlying conditions (ages 45 and above) | Yes | May 1st |
Ages 45 and above (no underlying conditions) | Yes | May 15th |
Anyone above 16 | Yes | June 1st |
16 and below | No |
Below are a few sample runs. Test your program with the following data (input is in blue):
Welcome to my COVID-19 Vaccine Eligibility program!!
Please enter your age: 15
You are not eligible for the vaccine!
Welcome to my COVID-19 Vaccine Eligibility program!!
Please enter your age: 45
Are you a health care worker? (y/n) n
Do you have an underlying condition? (y/n) y
You are eligible and can register after May 1st.
Welcome to my COVID-19 Vaccine Eligibility program!!
Please enter your age: 45
Are you a health care worker? (y/n) y
You are eligible and can register now.
Welcome to my COVID-19 Vaccine Eligibility program!!
Please enter your age: 65
Are you a health care worker? (y/n) n
Do you have an underlying condition? (y/n) n
You are eligible and can register after April 15th.
Welcome to my COVID-19 Vaccine Eligibility program!!
Please enter your age: 65
Are you a health care worker? (y/n) n
Do you have an underlying condition? (y/n) y
You are eligible and can register after April 1st.