Question: Consider the following program that allows a user to print the age of the Nth oldest known person to have ever lived. Note: The ages
Consider the following program that allows a user to print the age of the Nth oldest known person to have ever lived. Note: The ages are in a list sorted from oldest to youngest.
Modify the program to print the correct ordinal number stndrdth or th instead of thththth or th
For the oldest person, remove the ordinal number st from the print statement to say, "The oldest person lived years".
Reminder: List indices begin at not thus the print statement uses oldestpeoplenthperson to access the nthperson element element at index element at index etc.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
