Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Dictionary doctors _ room contains key - value pairs that represent the room number of each doctor. Dictionary patient _ directory contains key - value
Dictionary doctorsroom contains keyvalue pairs that represent the room number of each doctor. Dictionary patientdirectory contains keyvalue pairs that represent the patient in each room. String doctorname is read from input. Complete the following tasks:
Assign roomnum with the value associated with key doctorname in doctorsroom. Any string that is not a key in doctorsroom has default value
Use pop to remove roomnum from patientdirectory and assign patientname with the value returned. Any number that is not a key in patientdirectory has default value no one'.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started