What’s the lowest PM 2.5 pollution?

If we can figure out the city with the maximum pollution, the city with the minimum pollution should be pretty easy to find as well.

This section uses the same data file that we have been using, but if you want to see all of the data click on the Show button below. Once it appears, you can hide it again by clicking on the Hide button.

Before you keep reading...

Making great stuff takes time and $$. If you appreciate the book you are reading now and want to keep quality materials free for other students please consider a donation to Runestone Academy. We ask that you consider a $10 donation, but if you can give more thats great, if $10 is too much for your budget we would be happy with whatever you can afford as a show of support.

Can you now write the code to get the city with the smallest PM 10 value? Change the lines that start with a comment (a #) below. If you have problems see a solution in the other tab.

Here is a solution to finding the city with the smallest PM 10 pollution.

The following program prints the minimum PM 2.5 pollution found, but the code is mixed up. Drag the blocks of statements from the left column to the right column and put them in the right order. Then click on <i>Check Me</i> to see if you are right. You will be told if any of the lines are in the wrong order or have the wrong indention.

You have attempted 1 of 8 activities on this page