Develop a python program to solve a problem

Assignment Help Python Programming
Reference no: EM132484704

Programming Task

Aims

Develop a Python program to solve a problem
Follow good program development and coding style practices
Use loops and/or selection statements

Instructions
Write a Python program to solve the following problem. Your solution should include a readme.md file (which includes details of how to run your assignment) and your Python program in a file named air_quality.py, and be submitted as a single .tgz file named a2.tgz.

If each of the files in your solution are in the current working directory, you can create the .tgz file with the following command (see man tar for more details):

tar -zc readme.md air_quality.py > a2.tgz
To test your archive contains the correct files, copy it to an empty directory, change to that directory and run:

tar -zxf a2.tgz
This should result in readme.md and air_quality.py being extracted to the directory.

You should ensure your solution works using the Python 3 interpreter on turing.

Problem

Codetown has been having air quality issues. Some people have been having health issues, and some outdoor events have had to be cancelled, because breathing has been difficult.

In order to understand the extent of the problem, data are required. The mayor of Codetown has contacted you to develop a program for use by council workers in various parts of the city to collect air quality information, which will be used to help make informed decisions for future changes in the town.

Your program is to first request the number of air quality measurements that will be entered in the interaction with the program, and must then loop this number of times to collect the amount of ozone (parts per hundred million), sulfur dioxide (parts per hundred million), and particles less than 2.5 micrometers diameter (micrograms per cubic metre) that were measured for that site. Your program should then output the air quality index (AQI) for that measurement (using the calculation below).

The AQI is calculated as the maximum AQI for each of the pollutants being measured (ozone, sulfur dioxide, and particles less than 2.5 micrimeters diameter). The air quality index for each pollutant can be calculated as AQI_pollutant = 100*(pollutant data reading)/standard, where pollutant data reading is the value entered by the user for that pollutant and the standard value for each pollutant is given in the following table.

Pollutant Standard value
Ozone 8.0 parts per hundred million
Sulfur dioxide 20 parts per hundred million
Particles less than 2.5 micrometre diameter 25 micrograms per cubic metre

Your program should ensure that the number of readings being entered is a positive integer, and that all values for ozone, sulfur dioxide, and particles less than 2.5 micrometre diameter are non-negative numbers. If this is not the case, your program should prompt the user to enter the information that was entered incorrectly again.

Note that program specifications are not always clear. If you are uncertain about any aspect, you are typically better off asking than making assumptions. Please use the appropriate discussion forum to ask for clarification, if required.

Attachment:- Programming Task.rar

Reference no: EM132484704

Questions Cloud

How the fiscal policies affected gpd growth : How do I make an AD-AS graph for fiscal years 1999-2009? What type of data do I need to obtain in order to show how the fiscal policies affected GPD growth?
What is wage-price rigidity : What is wage-price rigidity? Do you agree with Keynes assessment that wage-price rigidity requires government's involvement in the markets? Why? Why not?
Determine gnp from gdp : Based on the table, what calculations must you make to determine GNP from GDP?
How environments affects businesses : Discuss macroeconomic environment associated with recessionary and inflationary periods and how such environments affects businesses.
Develop a python program to solve a problem : Develop a Python program to solve a problem and Write a Python program to solve the following problem. Your solution should include a readme.md file
One hour session with a physical trainer : Explain how GDP is affected by the sale of a one hour session with a physical trainer
Explain how gdp is affected by the sale of a new home : Explain how GDP is affected by the sale of a new home
What the companys accounts payable turnover is closest to : Beginning accounts payable was $27,000 and ending accounts payable was $48,000. The company's accounts payable turnover is closest to
What were the monetary and fiscal policy : 1) What were the monetary and fiscal policy responses to the "Great Recession"?

Reviews

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd