Most Difficult Published Exercise¶
Download the following files.
If you run the Python file without the modifications, you will only see:
These are the most difficult dictionary exercises:
What you should do¶
Call the
filter_difficult_and_published
function inmain
and pass it theexercises
list. If you run the program here, it will display all the exercises. Not what we want.Complete the
is_difficult
function. Read the doc string for what is considered “difficult” for this exercise.Complete the
is_published
function. Complete the docstring for this function. It should returnTrue
if the"published"
value in the given dictionary isTrue
. False otherwise.Complete the
filter_difficult_and_published
function. It recieves a list of dictionaries and returns a new list of all exercises that are both difficult and published. Make use of theis_published
andis_difficult
functions in here. Complete the docstring for this function.
What you should see¶
These are the most difficult dictionary exercises:
- Fields in a Row
- Using Keys Method to Edit All Fields
- Most Difficult Published Exercises