Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Skeleton Code to follow is shown further below, as well as Data.txt file to use Data.txt to use: Skeleton Code Outline to Use: This assignment

Skeleton Code to follow is shown further below, as well as Data.txt file to use

image text in transcribedimage text in transcribed

image text in transcribedimage text in transcribed

image text in transcribedimage text in transcribed

Data.txt to use:

image text in transcribed

image text in transcribedimage text in transcribed

Skeleton Code Outline to Use:

image text in transcribed

This assignment is worth 40 points (4.0% of the course grade) and must be completed and turned in before 11:59 on Monday, March 1, 2021. This assignment will give you more experience on the use of strings and functions. Assignment Overview An important question about the pandemic is the death rate which is often calculated as deaths per million of population. That rate is one metric for how well a country has responded to the pandemic. Once you have the ability to read files in Python you can examine raw data to answer such questions. Program Specifications In this project, you will read a file of data with total Covid deaths and the population of countries. You will then calculate the total deaths per million for countries. Assigning deaths to Covid is not consistently handled among countries and often not consistently within countries. However, there is more consistency with first-world countries so we will extract data for the G20 countries. (There isn't anything special about the G20 except that it makes the assignment more interesting.) Since we are dealing with real data there will be complications. For example, there are columns of data that we aren't interested in such as the deaths in the last seven days and there are rows of data that we aren't interested in such as non-G20 countries. There is one header row that describe columns but they are not data so we need to ignore them. Also, some data is in the thousands with commas and Python cannot directly convert a number with commas into a Python number such as an int or float. You will be asked to write a function to handle commas. Deaths-per-Million high-level algorithm Your high-level algorithm will be: 1. Open an input file for reading 2. Open a different file for writing 3. Write header information to the output file. 4. Loop through the input file, reading it line by line a. Call a function to process each line i. Call a function to handle commas b. Calculate deaths/million-population c. If the data is for a G20 country, display it and write it to a file 5. Close both files 6. Display which countries have deaths-per-million worse than the US File Specification The input file named data.txt has one header line and five fixed-field columns. Column 0 is a country name in a 25-character field), columns 1, 2, and 3 are integers, and column 4 is a float. The numbers are in 10-character fields. A file such as data.txt with fixed-field columns allows you to use string slicing to extract individual values. use Your program must also meet the following specifications: 1. You must have and use at least these four functionsmore are fine. A proj05.py file with function stubs is provided. a def open_file(ch) file_pointer i. If ch is 'w', open a file for writing; otherwise open a file for reading. Repeatedly prompt for a file name until a file is successfully opened. Use the try-except command. Usually, we would use except FileNotFoundError, but that works only for opening a file for reading so we want to use the more general file error for reading and writing so except IOError. If ch is 'w', the prompt should be 'Enter a file name for writing: else the prompt should be 'Enter a file name for reading: ii. Parameters: ch iii. Returns: file_pointer iv. Display: prompt and error message as appropriate b. def handle_commas (s,T) int or float or None i. The parameters are s, a string, and T, a string. The expected values of T is the word"int" or "float"; any other value returns None. If the value of T is "int", the string s will be converted to an int and that int value will be returned. Similar for "float". In both cases, you have to remove the commas from s before converting to int or float. If a value of s cannot be converted to an int or float, None will be returned (hint: use try-except) ii. Parameters: str, str iii. Returns: int or float or None iv. Display: nothing c. def process_line (line) str, int, float i. The parameter is a string which is a line from the file. Extract the country (string in a 25-character field), deaths (int in a 10-character field), and population (float in a 10-character field from the END of the line). Strip leading and trailing spaces from the country name. Return the country, deaths, and population. Use the function handle_commas to process the numbers for deaths and population ii. Parameters: str iii. Returns: str, int , float iv. Display: nothing d. def main() Your main algorithm will be as follows calling the above functions. i. Call open_file to open an input file for reading ii. Call open_file to open a different file for writing iii. Write header information (2 lines) to the output file and to the console. - The header information in the first line is: 'Country', 'Deaths', 'Population', 'Death Rate' - The header information in the second line is: ','','Millions', 'per Million For both lines, use the following formatting for the headers also provided in the strings.txt file): "{:10s}{:>14s}{:>14s)" iv. Loop through the input file, reading it line by line 1. Call a function to process each line a. Call a function to handle commas 2. Calculate deaths/million-population 3. If the data is for a G20 country, display it and write it to the output file. use the following string formatting for the numbers (also provided in the strings.txt file): "{:10,d}{:>14, 2f}{:>14, 2f}" v. Close both files vi. Display which countries have deaths-per-million worse than the US To determine which countries are worse than the US we provide the deaths-per- million for the US (1277.10). Note that the US rate is rounded to 2 digits after the decimal point. Start with an empty string before the loop and build a comma- separated string of the countries that you will display after the loop. Note that this item is not written to the output file. It is only written to the console. Deliverables The deliverable for this assignment is the following file: proj05.py -- your source code solution Be sure to use the specified file name and to submit it for grading via Mimir before the project deadline. Notes and Hints: 1. To clarify the project specifications, sample output is appended to the end of this document. 2. Items 1-9 of the Coding Standard will be enforced for this projectnote the change to include more items. 3. You can test functions separatelythat can be a huge advantage in developing correct code faster! If you cannot figure out how to do that, ask your TA for guidance. 4. We provide a string with the names of G20 countries. Hint use the string operator in to see if a country is in the G20. G20 = "Argentina, Australia, Brazil, Canada, China, France, Germany, India, Indonesia, Italy, Japan, South Korea, Mexico, Russia, Saudi Arabia, South Africa, Turkey, United Kingdom, USA, European Union" 5. We also provide a constant for the US death rate per Millions. Hint use this constant to look for the countries that have death rates high than the US. Note that the constant is rounded to 2 digits after the decimal point. US_RATE = 1277.10 6. Do not hard code your solutions the result is a zero. Hard coding means that your program for the specific tests rather than having a generic solution. Sample Interaction: Function Test handle_commas() S,T: 5 int Instructor: 5 Student : 5 S,T: 5.3 float Instructor: 5.3 Student : 5.3 S,T: 1, 234 int Instructor: 1234 Student : 1234 S,T: 1,234.56 float Instructor: 1234.56 Student : 1234.56 s,T: 5.3 xxx Instructor: None Student : None S, T: aaa int Instructor: None Student : None S,T: 1,234.56 int Instructor: None Student : None 3,596 336 35 11.69 Function Test process_line() line: Tunisia Instructor: Tunisia 3596 11.69 Student Tunisia 3596 11.69 line: China Instructor: China 4746 1397.72 Student : China 4746 1397.72 4,746 3 0 1, 397.72 140,958 2,836 385 1,366.42 line: India Instructor: India 140958 1366.42 Student : India 140958 1366.42 Test Case 1 Enter a file name for reading: data.txt Enter a file name for writing: outfile.txt Country Deaths Population Millions United Kingdom 98,339 66.83 Italy 85,881 60.30 USA 419, 196 328.24 Mexico 150, 273 127.58 France 72,590 67.06 Argentina 47,034 44.94 Brazil 217,664 211.05 South Africa 41,117 58.56 Germany 53,127 83.13 Canada 18,868 37.59 Russia 68,841 144.37 Turkey 25, 210 83.43 Saudi Arabia 6,355 34.27 India 153,587 1,366.42 Indonesia 28,132 270.63 Japan 5,193 126.26 Australia 909 25.36 South Korea 1,371 51.71 China 4,807 1,397.72 Death Rate per Million 1, 471.48 1,424.23 1,277.10 1,177.87 1,082.46 1,046.60 1,031.34 702.13 639.0 501.94 476.84 302.17 185.44 112.40 103.95 41.13 35.84 26.51 3.44 Countries with higher death rates than USA per million. United Kingdom, Italy Test Case 2 Enter a file name for reading: xxx Error opening file. Enter a file name for reading: yyyy.txt Error opening file. Enter a file name for reading: data.txt Enter a file name for writing: xxx/xxx Error opening file. Enter a file name for writing: outfile.txt Country Deaths Population Millions United Kingdom 98,339 66.83 Italy 85,881 60.30 USA 419, 196 328.24 Mexico 150, 273 127.58 France 72,590 67.06 Argentina 47,034 44.94 Brazil 217,664 211.05 South Africa 41,117 58.56 Germany 53,127 83.13 Canada 18,868 37.59 Russia 68,841 144.37 Death Rate per Million 1,471.48 1, 424.23 1,277.10 1,177.87 1,082.46 1,046.60 1,031.34 702.13 639.08 501.94 476.84 Turkey Saudi Arabia India Indonesia Japan Australia South Korea China 25, 210 6,355 153,587 28, 132 5,193 909 1,371 4,807 83.43 34.27 1,366.42 270.63 126.26 25.36 51.71 1,397.72 302.17 185.44 112.40 103.95 41.13 35.84 26.51 3.44 Countries with higher death rates than USA per million. United Kingdom, Italy Scoring Rubric Computer Project #05 Scoring Summary General Requirements 5 pts Coding Standard 1-9 (descriptive comments, function header, etc...) Implementation: 0 (7 pts) open_file (manual grading) (7 pts) Function Test handle_commas (7 pts) Function Test process_line (5 pts) Test 1 0 0 __ 0 (5 pts) Test 2 (4 pts) Test 3 (same as Test 1 but checking if output file is correct) 37.97 Country Belgium Slovenia United Kingdom Czechia Italy Bosnia and Herzegovina North Macedonia USA Bulgaria Moldova Hungary Peru Panama Croatia Spain Mexico France Sweden Switzerland Argentina Portugal Brazil Armenia Colombia Lithuania Chile Poland Romania Bolivia Ecuador Austria Georgia Kosovo Netherlands Slovakia South Africa Iran Germany Ireland Latvia Serbia Puerto Rico Tunisia Greece Ukraine Costa Rica Canada Israel Russia Albania Eswatini Jordan West Bank and Gaza Paraguay Honduras Lebanon Denmark Irag Guatemala Azerbaijan Oman Turkey Estonia Deaths Deaths. 7-day Increase Population 20,814 260 35 11.48 3,379 148 19 2.09 98, 339 7,042 590 66.83 15,453 807 84 10.67 85, 881 2, 724 420 60.30 4,593 38 3.30 2,791 65 6 2.08 419, 196 19, 281 1,910 328.24 8,880 266 60 6.98 3, 368 0 3,368 2.66 12,024 504 56 9.77 39, 608 838 0 32.51 5,098 234 35 4.25 4,859 175 32 4.07 56, 208 2,035 767 47.08 150, 273 7, 441 659 127.58 72,590 2,146 444 67.06 11, 005 682 0 10.29 9,146 287 81 8.57 47, 034 968 207 44.94 10, 721 1,475 252 10.27 217, 664 6, 173 627 211.05 3,047 40 8 2.96 51, 747 2,345 373 50.34 2,664 170 15 2.79 17,999 426 66 18.95 35, 401 1, 703 38 17, 841 472 65 19.36 10, 051 329 66 11.51 14, 639 257 16 17.37 7, 451 252 33 8.88 3,071 98 16 3.72 1,466 55 19 1.79 13, 472 412 38 17.33 4,068 431 0 5.45 41, 117 2,829 243 58.56 57,481 508 98 82.91 53, 127 4,130 831 83.13 2,977 269 7 4.94 1, 114 102 3 1.91 3,905 114 19 6.94 1, 778 75 5 3.19 6,287 443 53 11.69 5, 671 153 25 10.72 23, 001 964 75 44.39 2,558 81 40 5.05 18, 868 579 101 37.59 4,498 418 79 9.05 68,841 3,209 444 144.37 1, 324 37 9 2.85 493 90 14 1.15 4,239 69 15 10.10 1, 796 55 5 4.69 2,632 97 15 7.04 3,462 71 15 9.75 2,374 354 54 6.86 2,009 173 27 5.82 13,000 38 7 39.31 5,469 156 4 16.60 61 11 10.02 1,522 6 1 4.97 25, 210 882 137 83.43 383 39 7 1.33 3,093 82 63 84 4 7 161 10 20 57 67 12 23 34 9 60 869 1,542 23 2 314 12 316 0 42 250 42 23 19 11 14 2 2 22 2 3 9 3 2 0 11 2 14 117 297 4 33 39 Libya El Salvador Dominican Republic Kuwait Bahrain Morocco Kyrgyzstan Saudi Arabia Belarus Kazakhstan Cyprus Namibia Finland Jamaica Uruguay India Indonesia Norway Trinidad and Tobago Philippines Mauritania Egypt Qatar United Arab Emirates Zimbabwe Nepal Algeria Equatorial Guinea Lesotho Afghanistan Gambia Botswana Pakistan Syria Bangladesh Japan Sudan Venezuela Zambia Australia Senegal Kenya Gabon Malawi South Korea Nicaragua Guinea-Bissau Congo (Brazzaville) Haiti Malaysia Yemen Uzbekistan Ethiopia Cameroon Cuba Liberia Mali Angola Rwanda Central African Republic Sri Lanka Ghana Mozambique Madagascar 1,782 1,572 2,545 954 369 8, 172 1, 402 6, 355 1, 658 2,961 188 319 655 338 390 153, 587 28, 132 548 134 10, 292 417 9,012 248 798 1, 075 2,011 2,866 86 134 2,385 128 124 11, 376 890 8, 041 5, 193 1,738 1,154 660 909 582 1, 744 67 518 1, 371 168 45 117 243 689 615 621 2,071 462 197 84 324 461 177 63 287 372 363 279 50 1 1 53 0 6 70 10 3 0 11 7 0 19 58 5 18 74 135 6 21 36 273 40 99 513 135 38 82 6.78 6.45 10.74 4.21 1.64 36.47 6.46 34.27 9.47 18.51 1.20 2.49 5.52 2.95 3.46 1,366.42 270.63 5.35 1.39 108.12 4.53 100.39 2.83 9.77 14.65 28.61 43.05 1.36 2.13 38.04 2.35 2.30 216.57 17.07 163.05 126.26 42.81 28.52 17.86 25.36 16.30 52.57 2.17 18.63 51.71 6.55 1.92 5.38 11.26 31.95 29.16 33.58 112.08 25.88 11.33 4.94 19.66 31.83 12.63 4.75 21.80 30.42 30.37 26.97 7 0 0 10 11 46 10 1 182 71 0 0 3 3 70 3 1 34 7 22 0 11 5 7 19 29 3 O 1 2 3 14 14 110 6 4 5 58 0 130 ,507 OOO ARNDOOROONANDONOO OOONWOOOOOOOOWOOOOO 4,80 Program comment G20 = "Argentina, Australia, Brazil, Canada, China, France, Germany, India, Indonesia, Italy, Japan, South Korea, Mexico, Russia, Saudi Arabia, South Africa, Turkey, United Kingdom, USA, European Union" US_RATE = 1277.10 def open_file(ch): ""! Remember the docstring' pass # this is a placeholder that you will replace with Python code def handle_commas (s,T): ""! Remember the docstring' pass # this is a placeholder that you will replace with Python code def process_line(line): "! Remember the docstring' pass # this is a placeholder that you will replace with Python code def main(): # by convention "main" doesn't need a docstring pass # this is a placeholder that you will replace with Python code # These two lines allow this program to be imported into other code # such as our function_test code allowing other functions to be run # and tested without 'main' running. However, when this program is # run alone, 'main' will execute. if == "__main__": main() name This assignment is worth 40 points (4.0% of the course grade) and must be completed and turned in before 11:59 on Monday, March 1, 2021. This assignment will give you more experience on the use of strings and functions. Assignment Overview An important question about the pandemic is the death rate which is often calculated as deaths per million of population. That rate is one metric for how well a country has responded to the pandemic. Once you have the ability to read files in Python you can examine raw data to answer such questions. Program Specifications In this project, you will read a file of data with total Covid deaths and the population of countries. You will then calculate the total deaths per million for countries. Assigning deaths to Covid is not consistently handled among countries and often not consistently within countries. However, there is more consistency with first-world countries so we will extract data for the G20 countries. (There isn't anything special about the G20 except that it makes the assignment more interesting.) Since we are dealing with real data there will be complications. For example, there are columns of data that we aren't interested in such as the deaths in the last seven days and there are rows of data that we aren't interested in such as non-G20 countries. There is one header row that describe columns but they are not data so we need to ignore them. Also, some data is in the thousands with commas and Python cannot directly convert a number with commas into a Python number such as an int or float. You will be asked to write a function to handle commas. Deaths-per-Million high-level algorithm Your high-level algorithm will be: 1. Open an input file for reading 2. Open a different file for writing 3. Write header information to the output file. 4. Loop through the input file, reading it line by line a. Call a function to process each line i. Call a function to handle commas b. Calculate deaths/million-population c. If the data is for a G20 country, display it and write it to a file 5. Close both files 6. Display which countries have deaths-per-million worse than the US File Specification The input file named data.txt has one header line and five fixed-field columns. Column 0 is a country name in a 25-character field), columns 1, 2, and 3 are integers, and column 4 is a float. The numbers are in 10-character fields. A file such as data.txt with fixed-field columns allows you to use string slicing to extract individual values. use Your program must also meet the following specifications: 1. You must have and use at least these four functionsmore are fine. A proj05.py file with function stubs is provided. a def open_file(ch) file_pointer i. If ch is 'w', open a file for writing; otherwise open a file for reading. Repeatedly prompt for a file name until a file is successfully opened. Use the try-except command. Usually, we would use except FileNotFoundError, but that works only for opening a file for reading so we want to use the more general file error for reading and writing so except IOError. If ch is 'w', the prompt should be 'Enter a file name for writing: else the prompt should be 'Enter a file name for reading: ii. Parameters: ch iii. Returns: file_pointer iv. Display: prompt and error message as appropriate b. def handle_commas (s,T) int or float or None i. The parameters are s, a string, and T, a string. The expected values of T is the word"int" or "float"; any other value returns None. If the value of T is "int", the string s will be converted to an int and that int value will be returned. Similar for "float". In both cases, you have to remove the commas from s before converting to int or float. If a value of s cannot be converted to an int or float, None will be returned (hint: use try-except) ii. Parameters: str, str iii. Returns: int or float or None iv. Display: nothing c. def process_line (line) str, int, float i. The parameter is a string which is a line from the file. Extract the country (string in a 25-character field), deaths (int in a 10-character field), and population (float in a 10-character field from the END of the line). Strip leading and trailing spaces from the country name. Return the country, deaths, and population. Use the function handle_commas to process the numbers for deaths and population ii. Parameters: str iii. Returns: str, int , float iv. Display: nothing d. def main() Your main algorithm will be as follows calling the above functions. i. Call open_file to open an input file for reading ii. Call open_file to open a different file for writing iii. Write header information (2 lines) to the output file and to the console. - The header information in the first line is: 'Country', 'Deaths', 'Population', 'Death Rate' - The header information in the second line is: ','','Millions', 'per Million For both lines, use the following formatting for the headers also provided in the strings.txt file): "{:10s}{:>14s}{:>14s)" iv. Loop through the input file, reading it line by line 1. Call a function to process each line a. Call a function to handle commas 2. Calculate deaths/million-population 3. If the data is for a G20 country, display it and write it to the output file. use the following string formatting for the numbers (also provided in the strings.txt file): "{:10,d}{:>14, 2f}{:>14, 2f}" v. Close both files vi. Display which countries have deaths-per-million worse than the US To determine which countries are worse than the US we provide the deaths-per- million for the US (1277.10). Note that the US rate is rounded to 2 digits after the decimal point. Start with an empty string before the loop and build a comma- separated string of the countries that you will display after the loop. Note that this item is not written to the output file. It is only written to the console. Deliverables The deliverable for this assignment is the following file: proj05.py -- your source code solution Be sure to use the specified file name and to submit it for grading via Mimir before the project deadline. Notes and Hints: 1. To clarify the project specifications, sample output is appended to the end of this document. 2. Items 1-9 of the Coding Standard will be enforced for this projectnote the change to include more items. 3. You can test functions separatelythat can be a huge advantage in developing correct code faster! If you cannot figure out how to do that, ask your TA for guidance. 4. We provide a string with the names of G20 countries. Hint use the string operator in to see if a country is in the G20. G20 = "Argentina, Australia, Brazil, Canada, China, France, Germany, India, Indonesia, Italy, Japan, South Korea, Mexico, Russia, Saudi Arabia, South Africa, Turkey, United Kingdom, USA, European Union" 5. We also provide a constant for the US death rate per Millions. Hint use this constant to look for the countries that have death rates high than the US. Note that the constant is rounded to 2 digits after the decimal point. US_RATE = 1277.10 6. Do not hard code your solutions the result is a zero. Hard coding means that your program for the specific tests rather than having a generic solution. Sample Interaction: Function Test handle_commas() S,T: 5 int Instructor: 5 Student : 5 S,T: 5.3 float Instructor: 5.3 Student : 5.3 S,T: 1, 234 int Instructor: 1234 Student : 1234 S,T: 1,234.56 float Instructor: 1234.56 Student : 1234.56 s,T: 5.3 xxx Instructor: None Student : None S, T: aaa int Instructor: None Student : None S,T: 1,234.56 int Instructor: None Student : None 3,596 336 35 11.69 Function Test process_line() line: Tunisia Instructor: Tunisia 3596 11.69 Student Tunisia 3596 11.69 line: China Instructor: China 4746 1397.72 Student : China 4746 1397.72 4,746 3 0 1, 397.72 140,958 2,836 385 1,366.42 line: India Instructor: India 140958 1366.42 Student : India 140958 1366.42 Test Case 1 Enter a file name for reading: data.txt Enter a file name for writing: outfile.txt Country Deaths Population Millions United Kingdom 98,339 66.83 Italy 85,881 60.30 USA 419, 196 328.24 Mexico 150, 273 127.58 France 72,590 67.06 Argentina 47,034 44.94 Brazil 217,664 211.05 South Africa 41,117 58.56 Germany 53,127 83.13 Canada 18,868 37.59 Russia 68,841 144.37 Turkey 25, 210 83.43 Saudi Arabia 6,355 34.27 India 153,587 1,366.42 Indonesia 28,132 270.63 Japan 5,193 126.26 Australia 909 25.36 South Korea 1,371 51.71 China 4,807 1,397.72 Death Rate per Million 1, 471.48 1,424.23 1,277.10 1,177.87 1,082.46 1,046.60 1,031.34 702.13 639.0 501.94 476.84 302.17 185.44 112.40 103.95 41.13 35.84 26.51 3.44 Countries with higher death rates than USA per million. United Kingdom, Italy Test Case 2 Enter a file name for reading: xxx Error opening file. Enter a file name for reading: yyyy.txt Error opening file. Enter a file name for reading: data.txt Enter a file name for writing: xxx/xxx Error opening file. Enter a file name for writing: outfile.txt Country Deaths Population Millions United Kingdom 98,339 66.83 Italy 85,881 60.30 USA 419, 196 328.24 Mexico 150, 273 127.58 France 72,590 67.06 Argentina 47,034 44.94 Brazil 217,664 211.05 South Africa 41,117 58.56 Germany 53,127 83.13 Canada 18,868 37.59 Russia 68,841 144.37 Death Rate per Million 1,471.48 1, 424.23 1,277.10 1,177.87 1,082.46 1,046.60 1,031.34 702.13 639.08 501.94 476.84 Turkey Saudi Arabia India Indonesia Japan Australia South Korea China 25, 210 6,355 153,587 28, 132 5,193 909 1,371 4,807 83.43 34.27 1,366.42 270.63 126.26 25.36 51.71 1,397.72 302.17 185.44 112.40 103.95 41.13 35.84 26.51 3.44 Countries with higher death rates than USA per million. United Kingdom, Italy Scoring Rubric Computer Project #05 Scoring Summary General Requirements 5 pts Coding Standard 1-9 (descriptive comments, function header, etc...) Implementation: 0 (7 pts) open_file (manual grading) (7 pts) Function Test handle_commas (7 pts) Function Test process_line (5 pts) Test 1 0 0 __ 0 (5 pts) Test 2 (4 pts) Test 3 (same as Test 1 but checking if output file is correct) 37.97 Country Belgium Slovenia United Kingdom Czechia Italy Bosnia and Herzegovina North Macedonia USA Bulgaria Moldova Hungary Peru Panama Croatia Spain Mexico France Sweden Switzerland Argentina Portugal Brazil Armenia Colombia Lithuania Chile Poland Romania Bolivia Ecuador Austria Georgia Kosovo Netherlands Slovakia South Africa Iran Germany Ireland Latvia Serbia Puerto Rico Tunisia Greece Ukraine Costa Rica Canada Israel Russia Albania Eswatini Jordan West Bank and Gaza Paraguay Honduras Lebanon Denmark Irag Guatemala Azerbaijan Oman Turkey Estonia Deaths Deaths. 7-day Increase Population 20,814 260 35 11.48 3,379 148 19 2.09 98, 339 7,042 590 66.83 15,453 807 84 10.67 85, 881 2, 724 420 60.30 4,593 38 3.30 2,791 65 6 2.08 419, 196 19, 281 1,910 328.24 8,880 266 60 6.98 3, 368 0 3,368 2.66 12,024 504 56 9.77 39, 608 838 0 32.51 5,098 234 35 4.25 4,859 175 32 4.07 56, 208 2,035 767 47.08 150, 273 7, 441 659 127.58 72,590 2,146 444 67.06 11, 005 682 0 10.29 9,146 287 81 8.57 47, 034 968 207 44.94 10, 721 1,475 252 10.27 217, 664 6, 173 627 211.05 3,047 40 8 2.96 51, 747 2,345 373 50.34 2,664 170 15 2.79 17,999 426 66 18.95 35, 401 1, 703 38 17, 841 472 65 19.36 10, 051 329 66 11.51 14, 639 257 16 17.37 7, 451 252 33 8.88 3,071 98 16 3.72 1,466 55 19 1.79 13, 472 412 38 17.33 4,068 431 0 5.45 41, 117 2,829 243 58.56 57,481 508 98 82.91 53, 127 4,130 831 83.13 2,977 269 7 4.94 1, 114 102 3 1.91 3,905 114 19 6.94 1, 778 75 5 3.19 6,287 443 53 11.69 5, 671 153 25 10.72 23, 001 964 75 44.39 2,558 81 40 5.05 18, 868 579 101 37.59 4,498 418 79 9.05 68,841 3,209 444 144.37 1, 324 37 9 2.85 493 90 14 1.15 4,239 69 15 10.10 1, 796 55 5 4.69 2,632 97 15 7.04 3,462 71 15 9.75 2,374 354 54 6.86 2,009 173 27 5.82 13,000 38 7 39.31 5,469 156 4 16.60 61 11 10.02 1,522 6 1 4.97 25, 210 882 137 83.43 383 39 7 1.33 3,093 82 63 84 4 7 161 10 20 57 67 12 23 34 9 60 869 1,542 23 2 314 12 316 0 42 250 42 23 19 11 14 2 2 22 2 3 9 3 2 0 11 2 14 117 297 4 33 39 Libya El Salvador Dominican Republic Kuwait Bahrain Morocco Kyrgyzstan Saudi Arabia Belarus Kazakhstan Cyprus Namibia Finland Jamaica Uruguay India Indonesia Norway Trinidad and Tobago Philippines Mauritania Egypt Qatar United Arab Emirates Zimbabwe Nepal Algeria Equatorial Guinea Lesotho Afghanistan Gambia Botswana Pakistan Syria Bangladesh Japan Sudan Venezuela Zambia Australia Senegal Kenya Gabon Malawi South Korea Nicaragua Guinea-Bissau Congo (Brazzaville) Haiti Malaysia Yemen Uzbekistan Ethiopia Cameroon Cuba Liberia Mali Angola Rwanda Central African Republic Sri Lanka Ghana Mozambique Madagascar 1,782 1,572 2,545 954 369 8, 172 1, 402 6, 355 1, 658 2,961 188 319 655 338 390 153, 587 28, 132 548 134 10, 292 417 9,012 248 798 1, 075 2,011 2,866 86 134 2,385 128 124 11, 376 890 8, 041 5, 193 1,738 1,154 660 909 582 1, 744 67 518 1, 371 168 45 117 243 689 615 621 2,071 462 197 84 324 461 177 63 287 372 363 279 50 1 1 53 0 6 70 10 3 0 11 7 0 19 58 5 18 74 135 6 21 36 273 40 99 513 135 38 82 6.78 6.45 10.74 4.21 1.64 36.47 6.46 34.27 9.47 18.51 1.20 2.49 5.52 2.95 3.46 1,366.42 270.63 5.35 1.39 108.12 4.53 100.39 2.83 9.77 14.65 28.61 43.05 1.36 2.13 38.04 2.35 2.30 216.57 17.07 163.05 126.26 42.81 28.52 17.86 25.36 16.30 52.57 2.17 18.63 51.71 6.55 1.92 5.38 11.26 31.95 29.16 33.58 112.08 25.88 11.33 4.94 19.66 31.83 12.63 4.75 21.80 30.42 30.37 26.97 7 0 0 10 11 46 10 1 182 71 0 0 3 3 70 3 1 34 7 22 0 11 5 7 19 29 3 O 1 2 3 14 14 110 6 4 5 58 0 130 ,507 OOO ARNDOOROONANDONOO OOONWOOOOOOOOWOOOOO 4,80 Program comment G20 = "Argentina, Australia, Brazil, Canada, China, France, Germany, India, Indonesia, Italy, Japan, South Korea, Mexico, Russia, Saudi Arabia, South Africa, Turkey, United Kingdom, USA, European Union" US_RATE = 1277.10 def open_file(ch): ""! Remember the docstring' pass # this is a placeholder that you will replace with Python code def handle_commas (s,T): ""! Remember the docstring' pass # this is a placeholder that you will replace with Python code def process_line(line): "! Remember the docstring' pass # this is a placeholder that you will replace with Python code def main(): # by convention "main" doesn't need a docstring pass # this is a placeholder that you will replace with Python code # These two lines allow this program to be imported into other code # such as our function_test code allowing other functions to be run # and tested without 'main' running. However, when this program is # run alone, 'main' will execute. if == "__main__": main() name

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago