1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
gregori [183]
2 years ago
6

A friend of Kenneth's invited him to a party but forgot to give him the address. Luckily, Kenneth is very organized and has two

dictionaries, one that contains names and phone numbers; and another one that contains phone numbers and addresses. However, Kenneth needs your help to make it easier to find an address from a name. To achieve this, you will create a function called phone2address that takes three parameters:
⢠the first one is a dictionary that has names as keys and phone numbers as values
⢠the second one is a dictionary that has phone numbers as keys and addresses as values;
⢠the third one is a string with a friend's name.

To complete this function, you need to:

⢠First, use the phonebook and friend's name to find the desired phone number) .
Second, use the phone number and address book to find the correct address;
⢠Finally, you should return the address.
Computers and Technology
1 answer:
gregori [183]2 years ago
4 0

Answer:

Explanation:

The following code is written in Python and creates the function as requested in the question...

def phone2address(phonebook, addressBook, friendName):

   phoneNumber = phonebook.get(friendName)

   address = addressBook.get(phoneNumber)

   return address

The function uses the dictionary (phonebook) to look for the friendName input as the key and then saves the phone number attached to that name in a variable called phoneNumber. Then we use that variable to search the addressBook dictionary to find the associated address and save it to the address variable. Finally, we return that address.

You might be interested in
Why is computer called information processing maching???​
Vaselesa [24]

☆ <u>Since, the computer accepts raw data as input and converts into information by means of data processing, it is called information processing machine (IPM).</u>

HOPE IT HELPS ❣️

7 0
3 years ago
Read 2 more answers
Turns on her laptop and gets the error message "OS NOT FOUND." She checks the hard disk for damage or loose cable, but that is n
Serjik [45]
It needs an Operating System like a cable or something that will help it operate look for more and double check
3 0
3 years ago
6.- Escribe un ejemplo donde se utilice un sistema de información
lesya [120]

Answer:

<h3>Examples of information systems. Quality control systems. They are those in which there is customer feedback and the results are evaluated under statistics and final reports. The databases in a library. To organize and store file databases such as books, journals. journals, theses, etc.</h3>

Explanation:

8 0
2 years ago
____ is a philosophy and a software and system development methodology that focuses on the development, use, and reuse of small,
LiRa [457]

Answer:

d.) Service-Oriented Architecture

Explanation:

Because its definition matches

4 0
3 years ago
Which of the following is a sign that a website is inappropriate?
nata0808 [166]

Answer:

A

Explanation:

If you find something embarrassing, its more likely that other people with also think its embarrassing. All the other points are on the internet right now. Amazon sells things, News show information and there are political campaigns to show you there offers

3 0
3 years ago
Read 2 more answers
Other questions:
  • You are logged in as a user with limited system privileges, you are the linux system administrator and you have the password to
    5·1 answer
  • An element in a web page that connects to a different location in the same page or a different page is a _____.
    8·1 answer
  • A(n ____ is a named group of formatting characteristics.
    7·1 answer
  • What do character formats do for your document's message??
    14·2 answers
  • 2:3:5<br>_ _ _<br>3 2 8<br><br><br><br>find ratio​
    5·1 answer
  • Emma lives in Pennsylvania, what climate does she live in?
    7·1 answer
  • 2 examples of miniature storage media ?
    8·2 answers
  • When power is completely removed from your computer
    11·1 answer
  • Describe accessibility in Windows 7 ​
    13·1 answer
  • The __________ algorithm takes the ciphertext and the secret key and produces the original plaintext
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!