Question: in python Problem 2 Below is data from the GDP of several countries given in USD(Trillion). The elements of each countries ist are in order
in pythonProblem 2 Below is data from the GDP of several countries given in USD(Trillion). The elements of each countries ist are in order from 2015 to 2019. Note: 2015 is at index [1] of a country list In 1: country edp 11"Germany, 3.356,3.467,3.602,3.963,2.861), I "Spain". 1.195,1.232.1.312, 1.422.1.393). t"United States", 17.527.10.224,18.715,19.512,2.05801, I "Russia', 1.363,1.276,1.574,1.669,1.6991. I'China', 11.061,11.233,12.310.13.894, 14.34211 Q1 Print the total and the average sales in Spain Expected Output Total: 5.359 Average: 1.0718 IS IT Q2 Remove the gap of 2015 for all countries, then print the list all countries). Note: You should manipulate the country.gdp list. Do not construct a new ist Expected Output Germany', 3.487, 3.682,3.963, 3.861) [Spain', 1.232. 1.312, 1.422, 1.393) United States, 18.224,18.715, 19.512, 2058] [Russia', 1.276, 1.574, 1.669, 1.699) China', 11.233, 12.31, 13.894, 14.342] In 1 Q3 Remove all odp that are less than 1.3 Trillion, then print the list. Note: You should manipulate the country_9dplast. Do not construct a new list Expected Output 'Germany, 3.487,3.682, 3.963, 3.861) T'Spain', 1.312, 1.422. 1.393) United States, 18.224, 18.715, 19.512, 2.058] ['Russia', 1.574. 1.609, 1.6991 l'China', 11.233, 12.31, 13.894, 14.342] In 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
