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
vodomira [7]
3 years ago
9

Write a script that will read the file, (strip the carriage returns), create a dictionary of names and favorite radishes and cre

ate a dictionary of each radish type and the number of people who chose that as their favorite.

Computers and Technology
1 answer:
amm18123 years ago
8 0

Answer:

python code below:

names={}#first dictionary for names and favorite

favor={}#radish type and how many are favorite

f=open("raddish.txt")#opening file

for i in f:#for each line

j=i.strip().split("-")#splitting base on -

names[j[0].strip()]=j[1].strip()#getting first dictionary

if j[1].lower().strip() in favor:#counting the favorite elements

favor[j[1].lower().strip()]+=1

else:

favor[j[1].lower().strip()]=1

print ("First Dictionary",names)#printing the names

print("second dictionary:",favor)#printing the favorite numbers

f.close()#closing file

Explanation:

The program was implemented using python programming language.

Its operation is to read the file, (strip the carriage returns), create a dictionary of names and favorite radishes and create a dictionary of each radish type and the number of people who chose that as their favorite.

It returns as output the names of people entered for the Radishes.

See attachment for screenshot.

You might be interested in
In this exercise we look at memory locality properties of matrix computation. Th e following code is written in C, where element
Sonja [21]

Answer:

Explanation:

temporal locality can be defined as: when a particular memory  is referenced or accessed several times  within a specific period of time. In the question, i think the variable that exhibit temporal locality are I, J and 0(all the variable). This is because the variable J and 0 are accessed several times within the loop. I would not have been part of it, but in the A[I][J]=B[I][0]+A[J][I], the variable "I" is also accessed in the addition. this is why it is part of the temporal locality.

4 0
3 years ago
________ refers to the ability to model components and show how the components' inputs and outputs relate to one another.
Black_prince [1.1K]

Answer:

Central Processing Unit

Explanation:

When the CPU puts the address of a peripheral onto the address bus, the input–output interface decodes the address and identifies the unique computer peripheral with which a data transfer operation is to be executed.

5 0
3 years ago
What is an easy and accurate way that a graphic designer can increase the size of a digital shape while keeping the ratio of hei
VikaD [51]

Answer:

Open the shape’s properties window, and type the height value multiplied by 2 and the width value multiplied by 3.

Explanation:

7 0
3 years ago
Read 2 more answers
Why is it important to install updates? Why should you use the Power button on the Start menu instead of the Power button on you
IrinaK [193]

Answer:

Software updates do a lot of things. Software updates offer plenty of benefits. ...

Updates help patch security flaws. Hackers love security flaws, also known as software vulnerabilities. ...

Software updates help protect your data. ...

It’s not all about you. ...

You deserve the latest and greatest

Explanation:

hope that worked

3 0
3 years ago
What does MMF2 use to measure an object's position in the play area?
DerKrebs [107]

Answer:

The X and Y coordinates of the object's hotspot

Explanation:

MMF2 is simply known in full as Multimedia Fusion 2, and it is a visual programming tool that was developed by the ward winning software development group known as Clickteam. The programing tool which was made after Multimedia Fusion 1.5 allows for the creation of applications and games.

The tool is built in such a way that the X and Y coordinates of the object's hotspot are rightly used to measure the position of an object in the play area.

3 0
2 years ago
Other questions:
  • Background Susan finished work on system architecture issues, and her system design specification was approved. Now she is ready
    15·1 answer
  • Which markup language would be considered the most current for web design? HTLM, HTML5, XHTLM, XHTML 6
    14·2 answers
  • If reading or writing a cache line of size 64 bytes to Flash requires 2.56 μJ and DRAM requires 0.5 nJ, and if idle power consum
    9·1 answer
  • An employee who interacts with customers regarding the nature of their car problems, rather than actually working on the vehicle
    12·2 answers
  • Describe two types of technology your parent(s) or caregivers use to help care for or support you. how do you benefit from this?
    8·1 answer
  • ________ is a set of rules for exchanging files such as text, graphic images, sound, video, and other multimedia files on the we
    14·1 answer
  • You want to divide the value in cell D3 by the value in cell E3. Which formula should you use?
    11·2 answers
  • In an MLA style citation for an image, what information should be listed first? A. The name of the creator B. The title of the i
    8·2 answers
  • Explain 3 categories of plagiarism​
    14·2 answers
  • What is the main difference between a search engine and a web browser?
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!