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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started