subject

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

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:00
Someone with this coz i don’t really know what i can choose, just pick whatever u want. homework - you need to choose a website that you like or use frequently. you must visit the website and discuss 6 different features/parts/aspects of the website that you think makes it good. (100 words)
Answers: 2
question
Computers and Technology, 22.06.2019 10:50
Using least squares fitting, you are to fit the data sets to the following models and solve for the parameters ai , where i is the index of the parameter. the input/output data for the systems are linked in the bblearn site. for each of the systems use matlab to plot the supplied data vs. the model fit on one plot. include your code in the solutions. (a) linear fit "lineardata.mat" y=a1x^3 + a2x^2 + a3x + a4 (b) plant fit "plantdata.mat g(s) = a1/(s + a2)
Answers: 1
question
Computers and Technology, 22.06.2019 16:20
Octothorpe is another name for what common computer keyboard symbol?
Answers: 1
question
Computers and Technology, 22.06.2019 18:00
What is the first view you place in your drawing?
Answers: 1
You know the right answer?
Use a for/else loop to traverse through the key names in the dictionary below in order to find Mr. P...
Questions
question
Social Studies, 26.10.2021 23:00
question
Mathematics, 26.10.2021 23:00
question
Mathematics, 26.10.2021 23:00
Questions on the website: 13722363