Question
Read the drinkingWater.csv file and compute access Start by removing the print statement in makePopDictionary and adding a call to readDWdata in main(). Your test
Read the drinkingWater.csv file and compute access
Start by removing the print statement in makePopDictionary and adding a call to readDWdata in main(). Your test program will now be printing out
In the readDWdata function, write the code for reading in the drinkingWater.csv file and extracting the country name and the percentages for 1990 and 2010. If a country does not have percentages for both year then you will skip it. Next compute how access has changed by subtracting the percentage in 1990 from the percentage in 2010. Print out the name of the country, the two percentages, and the difference.
The first five lines of your output should look like:
World 7688 12
Developing countries 7086 16
Africa 5666 10
North Africa 8792 5
Algeria 9483 -11
(home) 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
Regions/Subregions/countries (percent of population with access)
World 76 77 78 78 79 79 80 81 81 82 83 83 84 85 85 86 86 87 87 88 88
Developing 70 71 72 73 74 74 75 76 77 78 79 80 80 81 82 83 84 84 85 86 86
Africa 56 56 57 57 58 58 59 59 60 60 61 61 62 62 63 64 64 65 65 66 66
North Africa 87 87 88 88 88 88 88 88 89 89 89 89 91 91 91 91 91 91 92 92 92
Algeria 94 94 94 95 94 93 92 91 91 90 89 88 88 87 86 85 85 84 83 83 83
Egypt 93 94 94 94 94 94 95 95 96 96 96 96 97 97 97 98 98 98 99 99 99
Libya 54 54 54 54 54 54 54 54 54 54 54 54
Morocco 73 73 74 75 75 76 76 77 77 78 78 78 79 80 80 80 81 81 82 82 83
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