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

  What are the differences between python and c++

What are the differences between Python and C++? Other than the fact that C++ is object oriented programming and Python is not.

  Do a python project and get it running using app engine

Do a python project and get it running using App engine. Something very basic and simple

  Calculate and display the average of the 5 scores

Each gymnast in a competition receives scores from 5 judges. Write a Python program to do the following. calculate and display the average of the 5 scores.

  Convert between temperatures in fahrenheit

Write a Python application that allows the user to convert between temperatures in fahrenheit and temperatures in celsius.

  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.

  Write another python program to decode the encoded message

Write another Python program to decode the encoded message according to the "circular Caesar cipher" problem presented in Programming Exercises 7 and 8 of Book Chapter 5.

  Calculate and output the walls area

Prompt the user to input a wall's height and width. Calculate and output the wall's area. The response paper should be in APA format.

  Write the function maxval which returns larger of integers

Write the function maxVal ( a , b ) which returns the larger of integers a and b. Write a script which tests maxVal interactively within a print statement.

  Enter an amount as a floating-point value representing

The program lets the user enter an amount as a floating-point value representing a total dollars and cents, and then outputs a report listing the monetary.

  Convert a fahrenheit temperature to celsius

Convert a Fahrenheit temperature to Celsius, or vice versa. The program should use two custom functions, f_to_c and c_to_f, to perform the conversions.

  Implement key exchange using the diffie-hellman algorithm

Implement key exchange using the Diffie-Hellman algorithm, when peer-to-peer connections are made between bots. Achieve con dentiality through encryption of the client-server communications with an appropriate block or stream cipher

  Compute the sample mean of a list of numbers

The return value should be the sample mean and the input value should be the list of numbers. Do not use a built-in function for the mean. Show an example.

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