Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Computer ProgrammingPROBLEM 1 CSC 1 2 1 - Lab 0 2 D:ICSC 1 2 1 CSC 1 2 1 . 0 0 5
Computer ProgrammingPROBLEM CSCLab D:ICSCCSCCSCLab
Screenshots
LabPpy
LabPpy
External Libraries
Scratches and Consoles
if aqi
Run LabP
C :
C: Users Jimmy AppDataLocalProgramsPython Pythonpythonexe D:CSCCSCCSCLab
LabPpy
Enter the Air Quality Index AQI:
Unhealthy for Sensitive Groups
Process finished with exit code
In this problem, you are given a completed program that has logic errors. You need to fix the errors.
This flawed program is an Air Quality Classifier. The user enters an AQI value, and the program outputs a specific health impact. Here are the classifications:
AQI Value Classification
Good
Moderate
Unhealthy for Sensitive Groups
Unhealthy
Very Unhealthy
or more Hazardous
The instructor has provided a file called LabPFixTheErrors.py Download that file and rename it LabPpy
Copy that file into your PyCharm project.
Change the program header to include your name and the date.
Run the program AS IS and see if you can determine what is wrong with the program.
Take a screenshot of the program running that demonstrates an error and name the screenshot LabPerror.jpg
HINT: Try using the AQI value of or and see how those are incorrectly classified. To make sure you have the program completely correct, test all BOUNDARY CONDITIONS.
Review the code and correct all the errors. You should eventually be able to run the program that accurately classifies the ages with no errors.
NOTE: PyCharm may give you a hint to "Simplify chained comparison" with a yellow underline. That suggestion can be safely ignored.
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