Write a code snippet that asks the user to enter a name and a major repeatedly one at a time and creates a dictionary with keys corresponding to names and values corresponding to majors. Your code should include: d

Answers

Answer 1

The code snippet is an illustration of dictionary;

Dictionary are used to hold values in pairs i.e. data and key pairs

The code snippet

The program written in Python, where comments are used to explain each line is as follows:

#This gets the number of inputs

n = int(input("Number of inputs:"))

#This creates a dictionary

d = {}

#This iterates from 0 to n-1

for i in range(n):

   #This gets the keys i.e. names

   keys = input()

   #This gets the values i.e. majors

   values = input()

   #This populates the dictionary

   d[keys] = values

#This prints the dictionary

print(d)

Read more about Python programs at:

https://brainly.com/question/26497128


Related Questions

3.7 Code Practice
can someone write a code for me

Answers

Answer:

Explanation:

raaaaa faraon- yt:

love shady

if a user watches a video with event tracking three times in a single session, analytics will count how many unique events?

Answers

Answer:

1

Explanation:

Analytics will count it a One (‘1’) Unique Event, even if a user watches a video with event tracking three times but in a single session.

One hint that you might be dealing with a phishing site is: a) Hidden address bar b) Fake address bar c) Misspelled text d) All the above

Answers

One hint that you might be dealing with a phishing website is: D. all the above.

What is phishing?

Phishing can be defined as a type of social engineering (cyberattack) which involves making an attempt to obtain sensitive user information, especially by disguising as a trustworthy entity in an electronic communication, which is usually over the Internet.

This ultimately implies that, some of the hints that an end user might be dealing with a phishing website include the following:

Hidden address bar.Fake address bar.Misspelled text

Read more on phishing here: https://brainly.com/question/23850673

#SPJ1

A student is going to e-mail a file she has created and needs to reduce the file size. What tool should she use to reduce the file size?

save and send

macros

compress media

save as

Answers

Answer:

Compress media

Explanation:

This zips the file into a smaller size which can now be sent. It can be decompressed to view.

you are running out of time and budget for your game development project you had great ideas for making a randomized highly customizable game experience with high levels of emerg but now you can only fit in the features of one of those qualities highly immersive highly randomize or highly customized briefly describe your imaginary games style then explain which of these three qualities would be best to implement in that type of game on a limited budget​

Answers

My games style  in terms of their qualities will be made up of:

Movement from Attack to Defense.Set up Defense.Movement from Defense to Attack. Set Pieces.

What is a game style?

Game style is known to be a term that is made or used by coaches, sports scientists, etc., to show the patterns of play in a scenario of team sports.

Therefore, My games style  in terms of their qualities will be made up of:

Movement from Attack to Defense.Set up Defense.Movement from Defense to Attack. Set Pieces.

Learn more about Games from

https://brainly.com/question/5144258

#SPJ1

Which subnet would include the address 192.168.1.96 as a usable host address?

Answers

The subnet for the address 192.168.1.96 will be 192.168.1.64/26.

What is a subnet?

The subnet in the host address is given as the logical subdivision or the partition of the IT network. It enables the computer systems to share the same internet.

The subnet for the address 192.168.1.96 will be 192.168.1.64/26. It is based on the increment with the octet it falls in.

Learn more about subnet, here:

https://brainly.com/question/15055849

#SPJ1

if you want to improve the overall quality and performance of your computer, which would you upgrade?
A. Monitor
B. Power Supply
C. RAM
D. ROM
Explain your choice

Answers

Answer:

RAM because it improves load times and has less ups and downs while under load

What is the need for computer programming?

Answers

Answer:

See Explanation

Explanation:

Programming languages use classes and functions that control commands. The reason that programming is so important is that it directs a computer to complete these commands over and over again, so people do not have to do the task repeatedly. Instead, the software can do it automatically and accurately.

swer from the options 1. How many basic input devices does a desktop computer have? a)2 b)3 c)1 d)4 2. The computer equipment which feeds the computer with data is called a)Storage device b) Processing device c) Diskette d) Input device 3.When an output is displayed in a printed formitis termed as a)Softcopy output b) File c) Document d) Hardcopyoutput 4. Which computer device will convert human voice into digital voice? a) Projector b)Loudspeaker c) Microphone d) Joystick 5) All the following are hardcopy output devices except a) Photocopier b) Printer c) Projector d) Plotter 6. The computer device which is used to display the content of data to the user is called a) Input device b) Storage device c) Output device d) Pen drive 7)Which of these computer equipments will be used to display the content of data to a larger size of class during instruction or presentation? a) Television b) Monitor c) Projector d) Plotter 8. Which of these is example of non-impact printer? a) light printer b) Laser printer c) Dot matrix printer d)Daisywheel printer 9) The content of data which is displayed on a screen to the user is called. a) Output b)Hardcopy output c) Input d) Softcopy output 10) All these devices are examples of softcopy output devices except a) Projector a) Monitor c) Television d) Pinter​

Answers

Answer:

1. 3

2. D (Input Device)

3. D (Hardcopy Output)

4. C (Microphone)

5. C (Projector)

6. C (Output Device)

7. C (Projector)

8. B (Laser Printer)

9. D (Softcopy Output)

10. D (Printer)

When running a spelling and grammar check, which of these options in the "not in dictionary"/suggestion area does nora need to select when she wants to fix an error? add to dictionary ignore once ignore all one of the suggested words

Answers

Answer:

ignore all one of the suggested words

Answer:  D: one of the suggested words

Explanation:mines from enginuity and this is what it said hope it helps:)

A system engineer enhances the security of a network by adding firewalls to both the external network and the internal company network. The firewalls are products of two separate companies. This is an example of what type of security control practice?

Answers

Answer:

Vendor diversity

Explanation:

Different cybersecurity companies maintain different codebases, which means an exploit that might poke holes in the security of one likely won't breach the other. In this situation, the network would still have an active and effective firewall from one vendor even as the exploit from the other vendor's firewall is being patched.

Zenith Computers is a software development company. It has received a random email claiming that there will be an attempt to hack and extract sensitive financial data of the company before the year end. The company has contacted you, a network analyst, to verify if such claims are indeed true. You have decided to set up a trap for the hackers by putting up a system containing false financial data. Which of the following will you use in this scenario?
A. Metasploit
B. Honeypot
C. Nessus
D. Nmap

Answers

Answer:

B. Honeypot

Explanation:

Honepots, like the name suggest, are sort of baits for the hackers. Honeypot pretty much decoys made to mimic the actual company computers. Hackers fall for it and think they hit jackpot. Once hackers try to extract info from the honeypot, the security analyst can either track the hackers to report to authorities or this is a way to distract hackers from the real protected data.

Identifying correction services tasks
what are some tasks commonly performed in correction services jobs? check all that apply.
interviewing law offenders
using weapons, handcuffs, and other tools to control prisoners
transporting people who are sick or injured to hospitals
maintaining order and security in a courtroom
searching prisoners and their belongings
o providing legal advice to inmates
o guarding and counting inmates

Answers

The correction services tasks are:

The using of weapons, handcuffs, and other tools to control prisonersTransporting people who are sick or injured to hospitalsGuarding and counting inmates.

What is the role of the corrections?

Corrections is known to be  the aspect of  criminal justice system that helps to handle individuals who have been found to have done or committed  a crime.

Note therefore, that the correction services tasks are:

The using of weapons, handcuffs, and other tools to control prisonersTransporting people who are sick or injured to hospitalsGuarding and counting inmates.

Learn more about correction services from

https://brainly.com/question/6705028

#SPJ1

Answer:

a.b.e.g

Explanation:

Hello! I am having trouble with this code and I am trying to find out the error. (html5 by the way.)

body {
background-color: lightblue;
color: deeppink;
}

h1 {
width: 100%;
}

{
float: right;
width: 200px;
margin: 10px;
border-radius: 20px;
}

p {
text-align: left;
font-family: fantasy;
font-size: 14px;
}

Answers

Explanation:

On line 10 you wrote:

{

float: right;

width: 200px;

margin: 10px;

border-radius: 20px;

}

This is the origin of your error. You have not declared any selector for the properties. Remember CSS rules take the following form:

selector {

   property: value;

}

how to transfer crypto from coinbase to coinbase wallet

Answers

Answer:

Open Coinbase Wallet on your mobile device.

Tap to go to your Settings.

Tap Buy or Transfer.

Select the supported crypto.

Enter the amount you want to transfer then tap Continue.

Follow the remaining steps to complete your transfer.

Match the script file extension to the description. - .bat - .ps1 - .vbs - .sh - .py - .js a. Windows PowerShell script file b. Unix or Linux shell script file c. Windows batch file

Answers

Answer:

.bat = windows batch file

.ps1 = windows powershell file

.vbs = virtual basic script

.sh = unix or linux shell script file

.py = python file

.js = javascript file

Which organization provides a free, online html5 validator application to ensure that a webpage's html tags follow the rules for html5?

Answers

The organization provides a free, online html5 validator application to ensure that a webpage's html tags follow the rules for html5 is the W3C.

What does the W3C do?

The W3C's is known to help to create protocols and rules that makes sure that long-term  development of the Web.

Therefore, we can say that The organization provides a free, online html5 validator application to ensure that a webpage's html tags follow the rules for html5 is the W3C.

Learn more about The W3C  from

https://brainly.com/question/11179793

#SPJ1

software that requires a monthly subscription fee is called

Answers

Answer:

Software as a service

Explanation:

You may hear this as (SaaS) for short.

What is it called when you use a specific piece of data, rather than a variable, for a value that should be able to change?

a.
debugging

b.
hard coding

c.
top-down programming

d.
data encoding

Answers

Answer:

data encoding

The main function of a(n) ____________________ is to centralize access control for the network by keeping an eye on both inbound and outbound traffic and preventing unauthorized users and malicious code from entering a network. .

Answers

Maybe the answer is “server”

Discuss the variety of shapes and sizes in which cases come for desktops, laptops, tablets, smartphones, portable media devices, and game consoles.

Answers

Modern computers are comes in a multitude of designs, sizes, and designs. There is a computer form to suit each use, whether it's a massive tower under a desk or a small brick the size of, well, a brick.

How is a laptop different from a desktop?

A desktop uses an external monitor, keyboard, and mouse to be used at work or at home, whereas a laptop has all of these components integrated in and can be easily transferred as a single device that can be used in a number of locations.

Thus, Modern computers are comes in a multitude of designs, sizes, and designs.

For more information about laptop different from a desktop, click here:

https://brainly.com/question/19340665

#SPJ1

HELP ASAP
Select the correct answer.
When designing an algorithm, what structure can be used to repeat some steps if a condition is met?
OA. iterations
OB. loops
OC. conditional
OD. flowcharts
OE. pseudocode

Answers

Answer:

B. loops

Explanation:

The while loop is used to iterate over a portion of code until a certain condition is fulfilled. Let's imagine we want to know how many times a number may be divided by two before it becomes less than or equal to one.

who am I ?

please say me the answers

Answers

Answer:

motherboard

Explanation:

because it serves as a platform to connect all the other parts of the computer. it is where CPU, harddrive, optical drives and other expansion are directly connected.

A UNIX or Linux system might identify a file as: /usr/imfst/flynn/inventory.doc. The first entry is a forward slash ( / ) representing the master directory, called the ____ directory. a.root b.working c.main d.branch

Answers

Answer:

C

i cant give you an explaination on why it is like that but C sounds and seems the correct one

Jake is a 6-year-old boy. his mother wants him to learn scissor skills for improving his finger grip. so, she hands him several colorful papers and a pair of scissors. jake does not have difficulty understanding which object cuts the other. what is this type of reasoning called?

a.
analogical
b.
deductive
c.
common sense
d.
inductive

please answer so brainly doesnt get rid of it.

Answers

According to this, I think it is common sense.

Workplace ethics include playing games. looking up things on the internet that are not work related. taking care of personal business without permission during work time. doing the work you have agreed to do while at work.

Answers

Answer:

Doing the work you have agreed to do while at work

Explanation:

I'm not sure what exactly there is to explain. The other options are not things that should be done in the workplace

list the parts of different engine.​

Answers

Answer:

here is the answer

Explanation:

The different parts that make up your car's engine consist of: the engine block (cylinder block), the combustion chamber, the cylinder head, pistons, the crankshaft, the camshaft, the timing chain, the valve train, valves, rocker arms, pushrods/lifters, fuel injectors, and spark plugs

Cloud Kicks wants a report Co categorize accounts into small, medium, and large based on the dollar value found In the Contract Value field. What feature should an administrator use to meet this request

Answers

The feature that the administrator can use to meet this request is known as Bucket Column.

What is a bucket column?

A bucket column is known to be formed when a person define a lot of categories (buckets) that are known to be used to group report values.

Therefore, The feature that the administrator can use to meet this request is known as Bucket Column. as one can report, sort, filter, and group via the use of bucket columns.

Learn more about accounts from

https://brainly.com/question/24756209

#SPJ1

The date you type at the beginning of a letter or report should be the date that the document is _____.

Answers

The date that is typed at the beginning of a letter or report should be the date that the document is:

Written

What is the Date of a Letter or Report?

Typically, the first date that is seen at the beginning of a report a document often connotes the date of writing.

For instance, if the letter or report was written today, it will bear today's date. This will help the recipient to have a clear understanding of the time frame.

Learn more about letter writing here:

https://brainly.com/question/1155995

#SPJ4

a computer is made up of four different types of devices which are

Answers

A computer is made up of four different types of devices which are input, storage, processing and output devices.

What are computer devices?

Computer devices are those components of computer known as the computer hardware that ensures the proper functioning of the system.

The four different types of devices found in the computer are :

Input devices: These are used to put in data into the system.

Storage device:. These are used for storage of processed data.

Processing device: This is the brain box of the computer.

Output devices: They are used to display data.

Learn more about hardware here:

https://brainly.com/question/24370161

#SPJ1

Other Questions
Help meh pls. I have till Sunday to complete this Solve 122(3n+1)+22. Show your answer in the form of an inequality. what are these least to grates1. 3.52. 3.7153. 3.174. 3.5715. 3.75 4. How did industrialization encourage the growth of public education? (1 pc 0 by increasing the demand for literate workers O by organizing workers into cooperatives and unions O by providing more jobs for children O by relocating families in company towns Drag each label to the correct category. What do Betty Friedan, Simone de Beauvoir, and Germaine Greer all have in common? They were all...Select one:a.Canadiansb.labour organizersc.writersd.politicians You are investing $1500 at 5.2% compounded annually. How much money will you have in 12 years? What makes art important, and why? 125% of what number is 45? Select the correct sentences on the image.Matthew throws a ball straight up into the air. It rises for a period of time and then begins to drop. At which points in the ball's journey will be the greatest force acting on the ball? Please help!! i will really appreciate it, need an answer asap! please and thank you! ^^ pasagot po, thank you a nurse is teaching a patient with prostate cancer how to self administer abiraterone. which patient statement indicates the need for further education Which screening test measures the overall integrity of primary hemostasis? 1. Mr. Lopez's partner just died and he has been unable to leave her side. He is grieving and tells you he will never be able to get over losing the love of his life. What is your BEST response Make up a question that you need to use 6 fractions to solve! It needs to involve subtraction. It can involve addition too. Which of the following is an example of kin selection? A. A wolf attacks its cousin over territorial rights. B. A snake eats the eggs of another snake. C. A badger attacks a bear who was foraging for food. D. A bobcat fights a wolf to protect younger bobcats. All the actions that occur after the climax and before the conclusion of the story.a. Rising Actionb. Conflictc. Resolution d. Falling Action A 30-foot ramp is used to move product to a loading dock. The ramp makes a 24 angle with the horizontal. The ramp is to be replaced with a ramp that is 50 feet long. What angle does this replacement ramp make with the horizontal? Round your answer to the nearest tenth of a degree. Explain impartiality