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
natta225 [31]
4 years ago
9

Write a program that asks for 'name' from the user and then asks for a number and stores the two in a dictionary (called 'the_di

ct') as key-value pair. The program then asks if the user wants to enter more data (More data (y/n)? ) and depending on user choice, either asks for another name-number pair or exits and stores the dictionary key, values in a list of tuples and prints the list. Note: Ignore the case where the name is already in the dictionary. Example: Name: pranshu Number: 517-244-2426 More data (y/n)? y Name: rich
Computers and Technology
1 answer:
AleksAgata [21]4 years ago
6 0

Answer:

#Declare the variables.

the_dict = {}

dictlist = []

#Begin the while loop.

while True:

   #Prompt the user to enter the name

   #and the number.

   input_name = input("Name: ")

   input_number = input("Number: ")

   

   #Ask the user to continue or stop

   #the program.

   input_choice = input('More data (y/n)? ')

   the_dict[input_name] = input_number

   

   #Check the input.

   if input_choice == 'n':

       break

#If the user want to continue

#then append in the list.

for key, value in the_dict.items():

   

   #Store the values in dictionary.

   temp_val = (key,value)

   dictlist.append(temp_val)

   

#Sort the list.

print(sorted(dictlist))

You might be interested in
Only the _________ can add users with passwords and limit user access to selected areas.
Iteru [2.4K]

Answer:

The answer to this question is "Quickbooks administrator.

Explanation:

The answer is the Quick books administrator because Quick books is a software that is used for accounting developed. It helps us to keep in mind all the expenses in the business and things like invoicing, reporting.In this software, we can add new users and give them permission. If we want to allow Users to access the software.

In the Quickbooks administrator, we can add the user with limited access also. So the correct answer is Quickbooks administrator.

8 0
3 years ago
Excel allows you to rotate text in a cell counterclockwise by entering a number between -1 degrees and -90 degrees. True or fals
liubo4ka [24]

Answer:

TRUE

Explanation:

8 0
3 years ago
Juan is interested in getting a job in the technological field. He is interested in protecting data from threats, and stopping h
aniked [119]

This question is incomplete because the options are missing; here is the missing section:

Which job would should Juan apply for?

A. Research and software development

B. Technical support

C. Training and support

D. Information security

The correct answer is D. Information security

Explanation:

In technology, information security is the area that deals with the protection of information or data in computers and other technological devices. This includes creating strategies, programs or protocols to stop unauthorized access to data, which can occur due to the action malicious programs such as viruses or due to hackers (experts in technology who use their knowledge to access illegally to data). In this context, Juan would need to apply to an information security job because this is part of the technology field and in this, he would need to protect data, which is exactly what he wants.

4 0
3 years ago
What are the biggest problems facing the criminal justice system in the area of computer crime
olchik [2.2K]

Answer:

1. Drug abuse

2. The criminal justice system and the Youths

3. High imprisonments

Explanation: Drug abuse is a major cause of computer crime as most computer crime have been linked with drug abuse.

Most of the people involved in computer crime are youths and young adults. The criminal justice system has to check better ways of managing the Youths involved.

The high level of imprisonments which continuously affects the correctional process and facilities.

5 0
4 years ago
Read 2 more answers
On a scale of 1-10 how would you rate your pain
aleksandrvk [35]

Explanation:

There are many different kinds of pain scales, but a common one is a numerical scale from 0 to 10. Here, 0 means you have no pain; one to three means mild pain; four to seven is considered moderate pain; eight and above is severe pain.

4 0
3 years ago
Other questions:
  • The command prompt found on windows 10 is very similar to the interface of what past operating system?
    5·2 answers
  • How can i appear offline without fb messenger saying "last active 1 minute ago"?
    5·1 answer
  • What is a organisation in office technology
    7·1 answer
  • Common input devices include the keyboard, ____, and integrated video cameras.
    12·1 answer
  • PLEASE PLEASE PLEASE PLEASE HELP!!! I REALLY NEED HELP AND ILL GIVE U A BRAINLIEST IF UR RIGHT!!
    13·1 answer
  • Which of the following advertisements is most likely a legitimate job advertisement?
    14·2 answers
  • What limited the possibilities of game development from a technical viewpoint?
    7·1 answer
  • By
    7·1 answer
  • D. Chipboard
    14·1 answer
  • When the function below is called with 1 dependent and $400 as grossPay, what value is returned?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!