Question: zyDE 6 . 1 . 1 : List's ith element can be directly accessed using [ i ] : Oldest people program. Consider the following
zyDE : List's ith element can be directly accessed using i: Oldest people program.
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 stndrdthth instead of ththththth
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.
tableLoad default template..,Run Runtime errortableFilehomerunnerlocalsubmissionmainpyline suffix th if nthpeople SyntaxError: expected 'else' after ifexpressionEN
The program can quickly
rson Note that the indexis
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
