Question: In this program you will be manipulating lists, using if statements, and implementing for loops. The file p 2 . py contains Python code that

In this program you will be manipulating lists, using if statements, and implementing for loops. The file
p2.py contains Python code that loads 3 lists. The lists identify the names and ages of 100 people as follows:
firstnames is a list of each person's first name
lastnames is a list of each person's last name
ages is a list of each person's age.
The lists correspond to each other so that the first name in the firstnames goes with the first name in the lastnames list which goes with the first age in the ages list to describe particular person. We want to divide these list according to each persons age.
Requirements for this program are as follows:
Your program must include a comment header with Author, Assignment (Program 1), Description, and Due Date.
Using the lists provided, you are to create and populate 9 lists as follows:
yfirstnames is a list of first names corresponding to people who are younger than 20
ylastnames is a list of last names corresponding to people who are younger than 20
yages is a list of ages corresponding to people who are younger than 20
mfirstnames is a list of first names corresponding to people who are 20 years old or older and younger than 55
mlastnames is a list of last names corresponding to people who are 20 years old or older and younger than 55
mages is a list of ages corresponding to people who are 20 years old or older and younger than 55
efirstnames is a list of first names corresponding to people who are 55 years old or older
elastnames is a list of last names corresponding to people who are 55 years old or older
eages is a list of ages corresponding to people who are 55 years old or older
Print a formatted table of the young people as follows:
Last Name
samplelast
First Name
samplefirst
Age
There should be one line for each person under that age of 20.
Extra Credit: Create and fill a matrix that contains all of the information about the people. The matrix must be created using Python commands (not manually typed). The beginning of the matrix may look something like this:
[['Lara', 'Laila', 48],['Olson', 'Caiden', 34],['Fischer', 'Isabel', 69],..
 In this program you will be manipulating lists, using if statements,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!