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 flowchart and C code for a program that does the following: Uses a do...while loop. Prints the numbers from 1 to 10 with
emmasim [6.3K]

Answer:

create the integer variable and initialize it to one, with the do statement, increment the variable by one and print it, then the while statement checks if the variable is less than or equal to 10.

#include <iostream>

using namespace std;

int main(){

   int i = 1;

   do {

       cout<< i << "\n";

       i++;

   }

   while (i <= 10);

}

Explanation:

The C++ source code initializes the integer variable i to one and increments and print the value if the value is less than or equal to ten. The do-while statement executes a block of code before the condition is implemented.

4 0
3 years ago
Randy is concerned about his company’s data security on the Internet. Because cellular signals are not encrypted, he is concerne
vovikov84 [41]

Answer:

Randy should deploy SSH to allow the sales department to connect to the company network securely over cellular data signal.

Explanation:

Option A is the correct answer because SSH means Secure Shell. And Secure Shell is a cryptographic network protocol for operating network services securely over an unsecured network. Any network service can be secured with SSH

Option B is not correct because VPN mean virtual private network. And what VPN does is to extends a private network across a public network, and enables users to send and receive data across shared or public networks as if their computing devices were directly connected to the private network.

Option C is not correct because IMEI means International Mobile Equipment Identity and is a number that is use to uniquel identify 3GPP and iDEN mobile phones, as well as some satellite phones.

Option D is not correct because POP3 is an example of email protocol. Post Office Protocol version 3 (POP3) is a standard mail protocol used to receive emails from a remote server to a local email client. POP3 allows you to download email messages on your local computer and read them even when you are offline.

4 0
3 years ago
Indenting the start and finish of segments
Georgia [21]

THAT IS THE ANSWER 1)requires the new programmers to insert comments o their own  


5 0
3 years ago
Read 2 more answers
A company asked you help mitigate the brute force attacks carried out against its users' Windows account passwords. You successf
alexdok [17]

Answer:

a. Require user account passwords

e. Set failed logon restrictions

b. Require strong passwords

Explanation:

3 0
3 years ago
Software that translates the sound of human voice into text is called:________.
S_A_V [24]

Answer:

C) speech recognition software.

Explanation:

Software that translates the sound of human voice into text is called a speech recognition software.

In Computer science, a speech recognition software is a voice technology application or program which enables the conversion of human voice such as spoken language to computer commands such as text through the use of speech recognition algorithms.

Some examples of speech recognition software are HTK, Kaldi, Voice navigator, Julius etc.

6 0
3 years ago
Other questions:
  • What is one way to process your thoughts about the information you are reading?
    14·2 answers
  • A. True
    5·1 answer
  • Look at the graph below. Which statement is TRUE based on the graph of an egg drop experiment?
    10·1 answer
  • 1.Electromagnetic waves can carry more data at higher frequencies. Why would a scientist opt to transmit data at a lower frequen
    12·1 answer
  • The Software Engineering Code of Ethics and Professional Practice was developed by Select one: a. Computer Professionals for Soc
    7·1 answer
  • If we can lock a file, we can solve the race condition problem by locking a file during the check-and-use window, because no oth
    14·1 answer
  • True or false.local and cloud backup differs in where the backup is saved
    15·2 answers
  • Select the correct answer. Vlad wants to include his goals and target in his résumé. He also wants to add how he can be benefici
    12·1 answer
  • Which element of a presentation program’s interface displays the slide you are currently creating or editing?
    14·2 answers
  • What best describes the ability to increase the access to server resources and provide fail-safe services by linking two or more
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!