Computers and Technology

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"
}

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 00:40, sierravick123owr441
Use a software program or a graphing utility with matrix capabilities to solve the system of linear equations using an inverse matrix. x1 + 2x2 − x3 + 3x4 − x5 = 6 x1 − 3x2 + x3 + 2x4 − x5 = −6 2x1 + x2 + x3 − 3x4 + x5 = 3 x1 − x2 + 2x3 + x4 − x5 = −3 2x1 + x2 − x3 + 2x4 + x5 = 5
Answers: 3
image
Computers and Technology, 24.06.2019 07:00, erick7123
Why do we mark tlc plates with pencil and not with pen
Answers: 2
image
Computers and Technology, 24.06.2019 08:30, 5theth
Intellectual property rights are exclusive rights that protect both the created and the creation. ipr offers exclusively what benefits to the person or people covered by it
Answers: 3
image
Computers and Technology, 24.06.2019 21:00, Winzen07
Which device has the most limited computing functionality?
Answers: 1
Do you know the correct answer?
Use a for/else loop to traverse through the key names in the dictionary below in order to find Mr. P...

Questions in other subjects:

Konu
English, 23.10.2021 08:50
Konu
Social Studies, 23.10.2021 08:50