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]
3 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]3 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
N the following pseudocode, what percentage raise will an employee in Department 8 receive?
goldenfox [79]

Answer:

"MEDIUM_RAISE" is the correct answer for the above question.

Explanation:

  • In the above pseudo-code, The first if statement will false because the question suggests that the department value is 8, which is greater than 5. But the first if statement states that the department value is less than 5.
  • Then the else-if statement gets checked which gives the true result. It is because the value of the department variable is 8, which is less than 14.
  • So the else-if statement block will be executed which assigns the MEDIUM_RAISE value to the raise.
  • Hence the answer is "MEDIUM_RAISE".

4 0
3 years ago
The role of the
ElenaW [278]

Answer:

Tcp

Explanation:

8 0
3 years ago
Name of the best Android keyboard
mrs_skeptik [129]

I think Gboard is good, you can switch between languages quickly and you can translate in real time. Translation is not perfect, but it is the best translation available. Vocabulary and autocorrect is not bad too. You can change the background. It has some themes of its own, but you can always customise it with your own photo. It has instant gif, stickers and emoji options too. It also has a good collection of symbolic emojis like: *\0/*O_o(๑♡⌓♡๑)ᕙ( • ‿ • )ᕗ(☉。☉)!I cannot include all of them, they are in 100s.

But if you are looking for a solution for grammatical mistakes, then you may want to consider Grammarly.

5 0
3 years ago
Witch of the folowing functions does a browser preform
Elodia [21]
<span>it gives you the ability to perform many tasks for example search something or save your favorites.</span>
5 0
3 years ago
What is it called when you make predictions within given data?
denis23 [38]
<span>When a researcher uses given data to make a prediction, this is known as a hypothesis. The hypothesis generally serves as a starting point for future research, allowing a researcher to further develop their theory through additional testing, observation, and, if necessary, revision to the current hypothesis.</span>
4 0
3 years ago
Other questions:
  • A broadband router is used to do which of the following? run the programs on a computer locate lost files on a computer manage a
    6·1 answer
  • 3. A hyperlink is important because it allows you to ___________. (1 point) click on the link to go directly to a website insert
    9·1 answer
  • 1. ________ is often defined as using illicit (illegal) drugs, or when the drug is alcohol, tobacco, or a legitimate drug (presc
    13·1 answer
  • A virtual meeting is the same thing as a/an A. online meeting. B. VoIP. C. seminar. D. convention.
    12·1 answer
  • What are the three types of mergers?
    8·1 answer
  • Proofreaders' marks are:
    6·1 answer
  • Is ryan patrick cullen gay
    7·2 answers
  • Java Programming
    14·1 answer
  • There is a population of owls in a forest. In one year there are 20 new owls born and 10 owls die. In this same year, 5 owls ent
    14·1 answer
  • What does intelligent route planner show to owners when they have entered a destination into the navigation system in 2023 ariya
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!