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
What's your fav show?
mezya [45]

Answer:

<h3>ITS DEPENDS IF I'M INTERESTED</h3>

Explanation:

HBU?^_________^

6 0
3 years ago
Read 2 more answers
All computers preform disk utilization the same software.<br> true or false
nikitadnepr [17]
"All computers preform disk utilization the same software "
This is false .
3 0
4 years ago
Read 2 more answers
Use sample program from called getopt.c (provided below)
GREYUIT [131]
Beasts shush shrub Nehru need Brid Nehru
6 0
4 years ago
daniel wants to buy a computer to use for playing games after work. he loves racing games and wants to make sure his device has
kirza4 [7]

The factors which should be considered by Daniel are the RAM capacity and the Processor Core of the computer.

Computer games especially racing and football games are usually memory intensive and as such will require a good amount of RAM in other to ensure that the game runs smoothly as the RAM provides a temporary storage required for applications or programs to run smoothly.

Also, the processor core has to be put into consideration, Daniel will need a multi - core processor in other to aid the smooth running of his racing game.

Therefore, the factors that should be considered are the RAM and processor core.

Learn more :brainly.com/question/25010930

5 0
3 years ago
Use the table on the right to convert from decimal to octal.
steposvetlana [31]

Answer:

the answer is

The octal value of decimal 13 is 15

Explanation:

3 0
3 years ago
Other questions:
  • Your colleagues are discussing the operation of a device in which packets are routed between VLANs on the device rather than hav
    7·1 answer
  • The person who Oversee the direct work of employees and is responsible for the day-to-day tasks the employees complete is likely
    7·2 answers
  • Why is it a good idea to understand what you are good at and what you enjoy
    11·2 answers
  • Leonardo is having difficulty accessing the course website. he should contact the for assistance. (points:1)
    13·1 answer
  • Which of the following is defined in terms of their activities related to denial-of-service attacks? Cracker Script kiddie White
    6·1 answer
  • Question B_1 (15 points) Please define (describe) local variables and how they are used in computer programming ( e.g. In C, C )
    6·1 answer
  • Interface elements include but are not limited to:
    8·1 answer
  • Ict quiz I attached a picture
    11·2 answers
  • When memory allocation is ____, it means all portions of the program and OS are loaded into sequential locations in memory.
    15·1 answer
  • HELP PLEASE!!!!!!!!!<br> Please fix the coding! thanks I give brainliest
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!