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
Which statement describes part of the meeting scheduling process? It is always an all-day event. It is created in a single calen
olga nikolaevna [1]

Answer:

is there a pic or something, sorry i cant help at the time being

Explanation:

5 0
3 years ago
What is the most significant difference between improving an existing process and designing a new process?
san4es73 [151]

The most significant difference between improving an existing process and designing a new process is that as a person is completely working again on a process or designing a new process, there are known to be a lot of unknowns factors that may occur.

<h3>What is the difference about?</h3>

In working or  redoing a process or designing any kind of new process, there are known to be a lot of unknowns factors.

This is said to be the most significant difference that exist between improving a process and designing a new process. This makes a lot of new processes and products to be very focus on meeting their customer's performance needs or aims.

Learn more about designing from

brainly.com/question/1212088

#SPJ1

5 0
2 years ago
Which image file format is the most widely used?
Ostrovityanka [42]

Answer: jpeg because its a lot of people use it for quaity

7 0
2 years ago
What is an iterator and why is it useful for ADTs?
VladimirAG [237]

Answer:

Iterator is the element that used for transversing of any container by the user. This provides the facility to user to process any constituent belonging to the container and storage of these elements can be in any form.

This situation takes place under the isolation condition of the user from the container's internal model. Abstract data types use iterators for the maintenance of the transversal of the data structure.

4 0
3 years ago
Write an<br> algorithm for "How to Polish Your<br> Shoes".
sammy [17]

Answer:

Step 1- Start

Step 2- Take out your shoes

Step 3- Take out the shoe polish

Step 4- Put the shoe polish on your shoe

Step 5- Then polish your shoe

Step 6- Stop

hope this helps

6 0
3 years ago
Other questions:
  • How many inputs are included in the following requirement? REQUIREMENT: Write a program that asks the employee for their age. Th
    6·1 answer
  • what is it called when you are biying and selling products via electronic channels such as the internet​
    13·2 answers
  • Researching the history of computers is a good troubleshooting technique.<br> True or False?
    5·1 answer
  • You use the Paste Options button labeled ____ if you want the pasted chart not to be linked to the source document and you want
    13·2 answers
  • Wich technology can a website use to allow you to listen to a concert live over the internet?
    10·1 answer
  • A library function that can find one string inside another is:
    9·1 answer
  • Mention two strategies of collecting data​
    13·1 answer
  • PLSSSSS HELPP!! Tropical rainforests are home to many kinds of birds, including parrots, toucans and eagles. Each different spec
    9·2 answers
  • Ryan would like to copy a list of contacts from a colleague into his personal address book. The list of contacts is contained in
    11·1 answer
  • Why should we learn Ethereum? Explain.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!