Question: There is a Python dictionary giving information on earthquakes, first its location as the key and its value as a list of its date, time,
There is a Python "dictionary" giving information on earthquakes, first its location as the "key" and its "value" as a list of its date, time, magnitude, whether it caused damage D or not ND the number of people deceased and an inner list of provinces affected, as below:
Initially we have:
Equakes Bor: :DNigde"Adana"
"Gemlik": :NDBursa"Yalova
"Elbistan": :DMaras"Antep","Adiyaman
"Pazarcik": :DMaras"Antep","Hatay"I
"Samandag": :DHatay"Osmaniye","Adana"
You are asked to write the PYTHON program that will :
a ask the user additional earthquake information and add these to this database until he prints "EOD" as the next location,
b then sorts this new dictionary in ascending order according to location names,
c afterwards compiles another dictionary, where the keys are dates in descending order and their values are locations,
d finally prints these two dicitonaries.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
