Write a subroutine in Python called evaluateAirQuality that will count the number of times the string "Hazardous" appears in a grid of air quality readings.
The subroutine should:
airSensorGrid as a parameter"Hazardous" appears in the airSensorGrid array"Evacuate" if there are exactly eight "Hazardous" items in the array"Hazardous" items if there are fewer than eight.You must write your own counting routine utilizing nested loops and not use any built-in count functions or methods (such as .count()) that might be available in Python.
You should use indentation as appropriate, meaningful variable name(s), and Python syntax in your answer.
| 0 | 1 | 2 | |
|---|---|---|---|
| 0 | Safe | Hazardous | Safe |
| 1 | Hazardous | Warning | Hazardous |
| 2 | Safe | Hazardous | Hazardous |