12 Prepare: Checkpoint
Overview
This checkpoint will help you practice finding things in a list.
Assignment
To simplify your program to focus on the task at hand, instead of reading from a file, please copy and paste the following list of people and their ages into your program:
people = [
"Stephanie 36",
"John 29",
"Emily 24",
"Gretchen 54",
"Noah 12",
"Penelope 32",
"Michael 2",
"Jacob 10"
]
Write a program to find the youngest person in the list.
Consider following these steps to build up to the finished program:
Iterate through the list and display each string to the screen.
Split the string into a name and age and print them to the screen.
Find the age that is the youngest.
Keep track of the name of the person that is the youngest.
Sample Solution
When your program is finished, please view a sample solution of this program to compare your approach to that one.
You should work to complete this checkpoint program first, without looking at the sample solution. However, if you have worked on it for at least an hour and are still having problems, you may feel free to use the sample solution to help you finish your program.
Sample solution: check12_sample.py
Testing Procedure
Because there is no user input, you don't need to test the program with different values. Instead, make sure that that following components are in place:
The list of people is included in the program.
The program can iterate through each string in the list.
The program can split the string into the appropriate pieces.
The youngest age is identified.
The name of the youngest person is identified.
Submission
When complete, please report your progress in the associated I-Learn quiz.