Use Python for this question: Implement a function eligible that returns a list of the names of people that are eligible for vaccination, subject to a minimum age requirement. The function eligible must: accept two arguments: the minimum age for eligibility, a positive integer a multiline string, containing the people waiting to be vaccinated. Each line of the string contains a person's name and their age, separated by a single space. return a list of the people who are eligible to be vaccinated, i.e., those whose ages is at least that of the minimum age for eligibility. They should be listed in the order they occur in the input string
Use Python for this question: Implement a function eligible that returns a list of the names of people that are eligible for vaccination, subject to a minimum age requirement. The function eligible must: accept two arguments: the minimum age for eligibility, a positive integer a multiline string, containing the people waiting to be vaccinated. Each line of the string contains a person's name and their age, separated by a single space. return a list of the people who are eligible to be vaccinated, i.e., those whose ages is at least that of the minimum age for eligibility. They should be listed in the order they occur in the input string
Chapter2: Using Data
Section: Chapter Questions
Problem 11RQ
Related questions
Question
Use Python for this question:
Implement a function eligible that returns a list of the names of people that are eligible for
vaccination, subject to a minimum age requirement. The function eligible must:
- accept two arguments:
- the minimum age for eligibility, a positive integer
- a multiline string, containing the people waiting to be vaccinated. Each line of the string
- contains a person's name and their age, separated by a single space.
- return a list of the people who are eligible to be vaccinated, i.e., those whose ages is at
- least that of the minimum age for eligibility. They should be listed in the order they occur in
- the input string
Output for this question is in the attached picture
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning