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
stiv31 [10]
2 years ago
7

Use a for/else loop to traverse through the key names in the dictionary below in order to find Mr. Potatohead’s mailing address.

The key name is his social security number. Once you find his SSN (key-name), you can display its value by using the following function:
print (Dictary.get(123-45-6789))

If the key you are looking for does not exist, your code should break out of the loop and display the following message: “Key not found”

Dictary = {
'code':6734,
'dept': 'sales',
123-45-6789:"Mr.Potato Head \n234 Potato Lane \nPotato Chip, ID 77725"
}
Computers and Technology
1 answer:
Tatiana [17]2 years ago
4 0

Dictary = {

'code':6734,

'dept': 'sales',

123-45-6789:"Mr.Potato Head \n234 Potato Lane \nPotato Chip, ID 77725"

}

for i in Dictary.keys():

   if i == 123-45-6789:

       print(Dictary.get(i))

       break

else:

   print("Key not found")

You can further test this code by deleting Mr.Potato head's info from the dictionary. I hope this helps!

You might be interested in
Read the following scenario, and then answer the question below.
shtirl [24]
Establish what skills are required to reach his goal
8 0
3 years ago
Read 2 more answers
All of these (except the ______) go unnoticed by the computer
astra-53 [7]
VIRUS I SERIOUSLY DONT KNOW THOUGH

5 0
3 years ago
Can Sombody please help me with this question, I'm struggling!
hjlf

Answer:

umm let me check if my answer is right

Explanation:

3 0
3 years ago
The backbone networks of the Internet are typically owned by long-distance telephone companies called
Aneli [31]

Answer:

network service providers

Explanation:

The backbone networks of the Internet are typically owned by long-distance telephone companies called network service providers.

A network service provider can be defined as a business firm or company that is saddled with the responsibility of leasing or selling bandwidth, internet services, infrastructure such as cable lines to small internet service providers.

5 0
3 years ago
Before u can open and edit a file, you need to zip it, T/F
koban [17]

Answer

False, it is not necessary that you need to zip a file always when you are opening and editing a file

<u><em>PLS MARK BRAINLIEST</em></u>

5 0
3 years ago
Other questions:
  • Some files appear dimmed in one of the default folders on your computer. What would be the best course of action? A. Leave the f
    11·1 answer
  • Discussion group may have a___________ who monitors the postings and enforces the sides rules​
    13·1 answer
  • You have informed your users that you need to bring the machine down at the end of the day to perform routine maintenance. Howev
    14·1 answer
  • What is a step by step procedure written to carry out a task?
    11·1 answer
  • opy the code below into the coderunner window. Debug the code so that it outputs the verses correctly. a = input("Enter an anima
    14·1 answer
  • Assume you have an Access database with five different tables, including various pieces of information about your client base. Y
    9·1 answer
  • Me inculparon de crear una cuenta en Facebook y colocaron el barrio donde vivo, ¿cómo podría demostrar lo contrario? Ayuda urgen
    6·1 answer
  • Based on the following passage on construction technology during the Middle Ages, why might a worker not be allowed to join a gu
    15·1 answer
  • This is using python.
    5·2 answers
  • A system engineer enhances the security of a network by adding firewalls to both the external network and the internal company n
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!