Question: 4 . In the building where I work, every office has a phone, and every phone has a unique number. If you know a person's

4. In the building where I work, every office has a phone, and every phone has a unique number. If you know a person's phone number, you can call them. For example, my phone number is 53. However, today, my office is being painted, so I'm going to work in Vivian's office. Her phone number is 97. I'm going to forward my phone number to hers, so that if anyone calls me on my phone number, it will ring in her office (where I will be). Meanwhile, her phone number will continue to work as usual. We can represent the situation using a dict:
forwards ={53: 97}
The forwards dictionary stores all of the current numbers that are being forwarded. The key shows that number that is being forwarded, and the value shows the number that it is being forwarded to. However, it turns out that Vivian's office is also being painted today, so we're both going to work in Bob's office, who has phone number 24. If we forward Vivian's phone number to Bob's, we ensure that both I and Vivian can get calls in Bob's office. Our updated forwards dictionary looks like this:
forwards ={53: 97,97: 24}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!