Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
ppy contains Python code that loads lists. The lists identify the names and ages of 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 Description, and Due Date.
Using the lists provided, you are to create and populate lists as follows:
yfirstnames is a list of first names corresponding to people who are younger than
ylastnames is a list of last names corresponding to people who are younger than
yages is a list of ages corresponding to people who are younger than
mfirstnames is a list of first names corresponding to people who are years old or older and younger than
mlastnames is a list of last names corresponding to people who are years old or older and younger than
mages is a list of ages corresponding to people who are years old or older and younger than
efirstnames is a list of first names corresponding to people who are years old or older
elastnames is a list of last names corresponding to people who are years old or older
eages is a list of ages corresponding to people who are 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
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', Olson 'Caiden', Fischer 'Isabel',
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