Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part 1 : Displaying Past 2 0 Years of US Data In this section, you will be asked to display the last twenty years of
Part : Displaying Past Years of US Data
In this section, you will be asked to display the last twenty years of data for the United States.
Create a markdown cell with a level header that reads "Part : Displaying Past Years of US Data".
Write a brief description of what you will be accomplishing in this part of the project. Do not format this text.
Print the population, life expectancy, per capita GDP and Gini index for the United States for every year since The
information should be arranged in columns, with a header explaining what the columns mean. Use spaces to separate
the values in adjacent columns. The first few rows of your output should look exactly as shown below, without the
indentation.
Year Country Population LExp pcGDP Gini
United States
United States
You can accomplish this by looping over the records. With each new record considered, check to see if the year for the
record is greater than or equal to and if the country associated with the record is equal to the string 'United
States'. If both criteria are true, then print the record as a new row in the output.
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