We have defined two lists:

```python
NAMES = ["Alice", "Bob", "Cathy", "Dan", "Ed", "Frank", "Gary", "Helen", "Irene", "Jack", "Kelly"]
AGES = [20, 21, 18, 18, 19, 20, 20, 19, 19, 19, 22]
```

These lists match up, so Alice's age is 20, Bob's age is 21, and so on.

Write a function `combine_lists(NAMES, AGES)` that combines these lists into a dictionary.

Then, write a function `people(age)` that takes in an age as input and returns a list of names of all the people who are that age.

For example:
- `people(18)` should return `['Cathy', 'Dan']`
- `people(23)` should return `[]`

Answer :

Final answer:

The problem can be solved by writing a Python function to combine two lists into a dictionary, and then another function to find and return the names that correspond to a given age.

Explanation:

The problem involves converting lists into a dictionary in Python and using it to return a list of certain values based on input. Here's how it can be done:

1. Write a function called combine_lists to combine NAMES and AGES into a dictionary.

def combine_lists(NAMES, AGES):
return dict(zip(NAMES, AGES))

2. Write a function called people to return names of people of a given age.

def people(age, dictionary):
return [name for name, a in dictionary.items() if a == age]

These functions zip NAMES and AGES into a dictionary, then iterate over the dictionary to find and return all the names that match the given age.

Learn more about Python Programming here:

https://brainly.com/question/33469770

#SPJ11