Question: Write a program that will ask the user several questions about their possible COVID-19 symptoms, and then output if or not the student should come

Write a program that will ask the user several questions about their possible COVID-19 symptoms, and then output if or not the student should come to class, stay home, or get a test.

The test will ask the user for their name and then will ask them about their symptoms. After answering the questions, the user will be given one of three recommendations (addressing the student by name). So if the name entered was "Shadi", the output options would be:

- Shadi, you should come to class.

- Shadi, you should stay home.

- Shadi, you should stay home and call 811 to schedule a test.

First, you should ask the user for their name.

Then, you should ask the user four questions:

- Do you have a headache? (y/n)

- Do you have a sore throat? (y/n)

- Do you have a runny nose / nasal congestion? (y/n)

- Do you have shortness of breath? (y/n)

If the user enters "n" for all four questions, request that they come to class. If the user enters "y" for only one of the questions, request that they stay home. If the user enters "y" for more than one question, request that they stay home and call 811. Make sure that all requests address the student by name.

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!