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
Write a python statement that print the number 1000
Sav [38]

1.

print(1000)

2.

x = 600

y = 400

print(x + y)

4 0
3 years ago
What are the names of the four major varnas in the caste system?​
saw5 [17]

Answer:

Brahmins, Kshatriyas, Vaishya and Shudras

8 0
3 years ago
Read 2 more answers
When does the VB.NET programming environment start to operate?
drek231 [11]

Answer:

B. once a VB.NET project is created in the Microsoft Visual Studio environment.

Explanation:

Visual Basic . Net is a programming language which is used to run complex software and projects. The VB projects which are created in Microsoft Visual Studio are run by console application. These computer applications run complex and technical software.

5 0
4 years ago
NullPointerException and ArithmeticException are both derived from which class?
irina1246 [14]

Answer: c) Run-time Exception

Explanation: Runtime Exception is the exception that works in the JVM(Java Virtual Machine) as a super-class. It can also act during the general working of the JVM and are not checked by any resources. The exception that are followed from the Runtime exception is Arithmetic exception and  Null pointer exception as the subclass. Therefore ,the correct option is option(c).

3 0
4 years ago
The expectations I would discuss with Erica regarding the usage of the internet
ryzh [129]

Answer:

Tell her about cyber bullies

Tell her about hackers

stalkers

identity theft

spam

Sorry if wrong

Explanation:

8 0
3 years ago
Other questions:
  • Briefly explain the cooling mechanism implemented in a fanless laptop
    15·1 answer
  • 1. Describe a linear search (explain how it works).
    13·1 answer
  • Whats the difference between copying a file to my desktop and creating a shortcut?
    8·1 answer
  • How do I keep my computer and data safe and secure while using the Internet?
    14·2 answers
  • Drag the right word to it’s definition
    13·1 answer
  • Im boing exam help please In a category-based course grading system, teachers weigh a student's performance in all courses. all
    7·2 answers
  • Help plz, u just gotta select all that apply :)
    15·1 answer
  • How would you describe binary to someone ??<br> PLEASE ANSWER I WILL GIVE U BRAINLY!!
    15·2 answers
  • Does anyone know what episode Hinata threatens useless sakura?
    9·1 answer
  • A small square at the right corner of the table is what?​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!