Question: python Copy the following dictionary into a code cell: lastEruption = {Mt.Etna: 2017, Mt. St. Helens :1980, Mt. Erebus: 2017, Mount Teide : 1909, Mt.
python
-
Copy the following dictionary into a code cell:
lastEruption = {"Mt.Etna": 2017, "Mt. St. Helens" :1980, "Mt. Erebus": 2017, "Mount Teide" : 1909, "Mt. Hood": 1800}
-
Define an anonymous function active that returns a boolean. It should return True if a volcano has erupted in the last 5 years
- use the function filter( ), the function active, and the dictionary of volcanoes to determine which volcanoes have erupted in the last 5 years.
- Print the names of the recently active volcanoes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
