Question: Create a function named `filter_data` that takes two arguments: a dictionary called `data` and a `number` **Function argument:** This function takes two arguments named `data`

Create a function named `filter_data` that takes two arguments: a dictionary called `data` and a `number`

**Function argument:** This function takes two arguments named `data` and `number`. The `data` argument is a dictionary and the `number` argument is the number that is used to filter the dictionary

**What does it do?:** This function filters out the `data` dictionary such that the key and valuie pairs will be removed from the `data` dictionary if the value is greater than the `number`

**What it returns?:** Returns a new dictionary with key and value pairs where the values are less than the `number`.

For instance,

`data = {'PLAYSTATION': 500, 'SMART WATCH': 5500, 'TABLET': 400}`

`filter_data(data)`

should return

`{'PLAYSTATION': 500, 'TABLET': 400}`

**Note:** Your code goes in the below cell.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!