

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
click for more info
Not enough gems
Cost: 6 gems
1: Dictionaries
incomplete
2: Duplicate Keys
incomplete
3: Accessing Dictionary Values
incomplete
4: Setting Dictionary Values
incomplete
5: Updating Dictionary Values
incomplete
6: Deleting Dictionary Values
incomplete
7: Counting Practice
incomplete
8: Iterating Over a Dictionary in Python
incomplete
9: Ordered or Unordered?
incomplete
10: Quest Status
incomplete
11: Merge Dictionaries
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Fantasy Quest stores each character's progress in a nested dictionary structure. Here's what it looks like:
{
"character_name": "Kaladin",
"quests": {
"bridge_run": {
"status": "In Progress",
},
"talk_to_syl": {
"status": "Completed",
},
},
}
The values can change of course, but the structure will always be the same. For example, another character's progress might look like this:
{
"character_name": "Shallan",
"quests": {
"bridge_run": {
"status": "Completed",
},
"talk_to_syl": {
"status": "In Progress",
},
},
}
Complete the get_quest_status function. It accepts a progress dictionary (structure defined above) and should return the value of the "status" field for the "bridge_run" quest. You do not need to use any loops for this task.
Note, you can chain dictionary keys on the progress dictionary to access the nested quest information inside another dictionary:
outer_dictionary["outer_key"]["inner_key"]