Asked by lisettejaesha
Question 2. Using both latest_poverty and population , create a...
Question 2. Using both latest_poverty and population , create a four-column table called recent_poverty_total with one row for each country in latest_poverty . The four columns should have the following labels and contents:
- geo contains the 3-letter country code,
- poverty_percent contains the most recent poverty percent,
- population_total contains the population of the country in 2015,
- poverty_total contains the number of people in poverty rounded to the nearest integer, based on the 2015 population and most recent poverty rate.
Image transcription text
N Run C Code Onbdiff Question 2. Using both latest_poverty and population , create a four-column table called recent_poverty_total with one row for each country in latest_poverty . The four columns should have the following labels and contents: 1. geo contains the 3-letter country code, 2. poverty_percent contains the most recent poverty percent, 3. population_total contains the population of the country in 2015, 4. poverty_total contains the number of people in poverty rounded to the nearest integer, based on the 2015 population and most recent poverty rate. In [38]: poverty_and_pop = latest_poverty . join ("geo", population) . group("geo", first) recent_poverty_total = poverty_percent . where("time", are. contained_in_or_equal_to( ) ) recent_poverty_total NameError Traceback (most recent call last) <ipython-input-38-f22679c1f916> in <module> 1 poverty_and_pop = latest_poverty . join("geo", population) . group("geo", first) 2 recent_poverty_total = poverty_percent. where("time", are. contained_in_or_equal_to( ) ) 3 recent_poverty_total NameError: name 'poverty_percent' is not defined In [ ]: grader . check("q2_2") Question 3. Assign the name poverty_percent to the known percentage of the world's 2015 population that were living in extreme poverty. Assume that the poverty_total numbers in the recent_poverty_total table describe all people in 2015 living in extreme poverty. You should find a number that is above the 2018 global estimate of 8%, since many country-specific poverty rates are older than 2018. Hint: The sum of the population_total column in the recent_poverty_total table is not the world population, because only a subset of the world's countries are included in the recent_poverty_total table (only some countries have known poverty rates). Use the population table to compute the world's 2015 total population.. In [ ]: poverty_percent = . . . poverty_percent In [ ]: grader . check("q2_3") MacBook Air
help troubleshooting Q2 and Q3 would be helpful also pseudocode or explanation walking through what code is doing to computer.
Answered by CoachEagleMaster212
Unlock full access to Course Hero
Explore over 16 million step-by-step answers from our library
Subscribe to view answernec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. P
ec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet a
ce dui lect
ur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor
gue
faci
, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lo
gue
tesque dapi
s a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscin
gue
entesque dapib