write a program that first reads in the name of an input file and then reads the file using the csv.reader() method. the file contains a list of words separated by commas. your program should output the words and their frequencies (the number of times each word appears in the file) without any duplicates. ex: if the input is: input1.csv and the contents of input1.csv are: hello,cat,man,hey,dog,boy,hello,man,cat,woman,dog,cat,hey,boy

Answers

Answer 1

High-level, all-purpose programming languages like Python are available. With the usage of extensive indentation, its design philosophy places an emphasis on code readability.

What is meant by Python?High-level, all-purpose programming languages like Python are available. With the usage of extensive indentation, its design philosophy places an emphasis on code readability. Garbage collection and dynamic typing are features of Python.It supports a number of programming paradigms, such as functional, object-oriented, and structured programming. Python is a computer programming language that is frequently used to create software and websites, automate processes, and perform data analysis. Because Python is a general-purpose language, it may be used to develop a wide range of programs and isn't tailored for any particular issues. Python is a great language for experienced programmers as well. Perhaps due to how simple it is to learn for novices, it is one of the most widely used programming languages in the world.

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

#This imports csv module

import csv  

#This initializes a dictionary

kounter = {}

#This gets input for the file name

fname = input("Filename: ")

#This opens and iterates through the file

with open(fname, 'r') as cfile:

  #This reads the csv file

  cfile = csv.reader(cfile)

  #This iterates through each line

  for line in cfile:

      #This iterates through each word on each line

      for words in line:

          #This counts the occurrence of each word

          if words not in kounter.keys():

              kounter[words] = 1

          else:

             kounter[words] + 1

#This prints the occurrence of each word

print(kounter)

To learn more about Python refer to:

https://brainly.com/question/26497128

#SPJ4


Related Questions

Which line of code will create an instance of the pet class?

class pet:
def __init__(self,strSpecies,strName):
self.species = strSpecies
self.petName = strName

myPetA = pet('dog', 'Spot'), myPetA = pet(self, 'dog', 'Spot'), myPetA = new pet('dog', 'Spot'), myPetA .pet() = 'dog', 'Spot'

Answers

Answer:

myPetA = pet(self, 'dog', 'Spot')

Explanation:

I mite be wrong

The line of code that will create an instance of the pet class is myPetA = pet (self, 'dog', 'Spot'). Option B is correct.

What is code?

Computer code, or a set of instructions or a system of rules defined in a specific programming language, is a term used in computer programming (i.e., the source code). It is also the name given to the source code after a compiler has prepared it for computer execution.

Code, often known as source code, refers to text that a computer programmer has created in a programming language. Programming languages like C, C#, C++, Java, Perl, and PHP are examples.

Another less formal term for text produced in markup or style languages, such as HTML and CSS, is code (Cascading Style Sheets)

Therefore Option B is correct.

Learn more about code:

https://brainly.com/question/17204194

#SPJ2

plz help me I have to submit the work before the day ends
13. (a) State one area where computers are used.
(2 marks)
(b) Give any two advantages of using computers in this area
(4 marks)
(c) Explain three effects of computer technology in the following areas:
(i) Job opportunities
(3marks)

Answers

Answer:

13. (a) One area where computers are used is in the creation of a record of auxiliary workers, doctors, nurses, patients, vendors, and payments that can be easily retrieved at an hospital

(b) Two advantages of using computers in an hospital are;

1) The ability to easily access the health record of a patient by a member of staff involved in treating the patient from any location

2) The reduction in the number of physical files and document kept at the counter or record storage which takes up more space as new patients are registered, even when the number of active patients remains the same

(c) Three effects of computer technology in the following area are;

(i) Job opportunities

1) The introduction of the desktop computer, increased the number of job opportunities in desktop publishing, administrative assistance and secretarial role

2) Computer technology has made more people able to work from home

3) Computer applications use with computer technology and developed to work with production machines has created a large number of machine operator job opportunities

Explanation:

Jason is working on a Microsoft Excel worksheet and he wants to create a Print Preview shortcut. His teacher asks him to access the Customization option to create the new shortcut. Which two tabs should Jason select to place the Print Preview shortcut on the worksheet toolbar?

Answers

Answer:

New Tab (Custom) and New Group (Custom)

Explanation:

In order to accomplish this Jason needs to use New Tab (Custom) and New Group (Custom). The New Tab (Custom) will allow Jason to add a new tab with the Print Preview shortcut as a brand new tab in the software. Then using the New Group (Custom) tab, Jason can group the Print Preview shortcut with the worksheet toolbar so that it appears as part of the original toolbar with the rest of the tools available in the toolbar.

ASKING AGAIN CAUSE I GOT A WEIRD LINK

HTML5 allows web pages authors to place a/an _________ element around a block-level element that contains child elements
a. nav
b. div
c. h1
d. a

Answers

Answer:

A. Nav

Explanation:

....,..........

What is computer task bar

Answers

Answer:

It is a bar where you can see all of your tasks or pinned items.

Explanation:

it is the small bar across the bottom of your computer screen with pinned apps or tabs, usually white

Choose the tag required for each stated goal.

To style text as larger than adjacent text:








To style text as bold:








To style text as italicized:








To style text as small:

Answers

capslockbolditalicscapslock

what is the meaning of url

Answers

Answer:

it stands for Uniform Resource Locator.

Explanation:

Uniform Resource Locator: a location or address identifying where documents can be found on the internet.

Describe the home keys

Answers

The home keys are where you place your fingers when you are learning to type. The home keys include F, D, S, and A on the left of the keyboard, and J, K, L, and ; (semicolon) on the right of the keyboard.
The home row keys are the row of keys on the computer keyboard you’re fingers rest on when not typing.

Brenda has created a Microsoft Excel spreadsheet which has 1000's of cells of data. She is looking for specific information in the file. Which shortcut can Brenda use to find this information quickly?

Answers

Brenda should use the Ctr+F shortcut to quickly find a specific information in the spreadsheet file.

What file format is best to give a printer when working with Adobe InDesign?


GIF

TIFF

HTML

IDML

Answers

Answer:

TIFF

Explanation:

GIFs are animated image files, and printers can't print animations

TIFFs are basically image files

HTML is a coding file, you were to print it, it would print the HTML text of the image

IDML is an XML representation of an InDesign document or components, if you were to print it, its outcome would be basically the same as printing an HTML file.

What humidity level should be maintained for computing equipment? a. 50 percent b. 40 percent c. 60 percent d. 30 percent

Answers

Answer:

A. 50 percent

Explanation:

The correct option is - A. 50 percent

Another preventive measure you can take is to maintain the relative humidity at around 50 percent. Be careful not to increase the humidity too far—to the point where moisture starts to condense on the equipment.

please help me with computing!
the question is:
solve the following algorithm in pseudocode "the algorithm is required to prepare a teacher's payroll. For them, the hours worked and the price per hour are taken into account. place the input data and the output data.​

Answers

Answer:

ok i help

Explanation:

You use a Windows system that is a member of a domain. The computer is used by several different users belonging to different groups. You have a custom application on the computer, and you want to configure the firewall as follows: Allow a specific port used by the application. Open the port only for members of the Sales group. Using Windows Firewall with Advanced Security, what should you do to configure the firewall with the least effort possible

Answers

Answer:

Explanation:

Windows Firewall with Advanced Security (WFAS) is a management tool in windows which allows for precise confiuration and control of the Windows Firewall System. It allows for certain rules to be created and modified which dictate to the firewall how it must run.

The easiest way to configure the WFAS to achieve the goal stated in the question is to open the app and use the New Rule function.

To do this, one must:

Calling up the Windows Firewall with Advanced Security (WFAS) Click on the inbound rules on the top left corner of the interfaceRight clickon the rule and modify accordingly

Cheers

You are a part-time manager for The Mobile Vegan, a food truck catering to vegan diners in Portland, Oregon. Jessica Rosen, the owner of the business, wants to expand by adding other food trucks in Portland and the surrounding area. Whether she purchases new trucks or takes over an existing food truck business with an established clientele, she needs a loan to cover the cost of the trucks. She has asked for your help updating the workbook she created to analyze the loan information and forecast sales. Switch to the Loan Scenarios worksheet, and then calculate the monthly payment for the Add 1 Truck scenario as follows:
a. In cell D11, enter a formula using the PMT function to calculate the monthly payment for a loan.
b. Use the inputs listed under the Add 1 Truck loan scenario in cells D5, D7, and D9. (Hint: The result will be displayed as a negative number to reflect the negative cash flow of a loan payment.)

Answers

Answer:

i acc dont know

Explanation:

srry

For what purpose is IT used in business?

Answers

Answer:

manufacturing

improving

customer care

transportation

human resource management

Explanation:

business communication use technology to improve their services or products as a way of gaining competitive advantage.

What are the available Advanced Calendar options? Check all that apply.

1. Add new contacts.
2. Set default reminders.
3. Change display options.
4.Add additional time zones.
5.Configure free/busy options.
6. Add new holidays and calendars.
7. Edit and set work times and hours.

Answers

Answer:B C D E F G

Explanation:EDGE 2021

Answer

every except the first one

Explanation:

For enterprise servers, or servers accessed around the clock, SATA disks are preferred over SAS disks. True or False

Answers

False, sas is hold more then sata disks do

The given statement is false that, SAS disks are preferable over SATA disks for business systems or servers accessed continuously.

What is the SATA disks?

The majority of desktop and laptop hard drives use the SATA (or Serial Advanced Technology Attachment) interface, which was first introduced in 2003. Despite being rotary hard drives with spinning platters and a moving needle that writes data to successive sectors on each platter, they are known as SATA hard drives.

Serial ATA (Serial Advanced Technology Attachment, or SATA) is a command and transport protocol that outlines how data is transferred between a computer's motherboard and these types of mass storage devices (SSDs).

Therefore, it is false.

Learn more about the SAS disks, refer to:

https://brainly.com/question/28310028

#SPJ2

please help thank u!!!!!

Answers

Answer:

i believe you can change slides with the arrow keys not entirely sure though

Explanation:

Answer:

using the arrows

pressing space

and clicking the mouse

Explanation:

The numeric keys on a keyboard or calculator are referred to as a:
o Ten keypad
o Number keypad
o Keypad
o Number and symbols keypad

Answers

Answer:

Ten keypad

Explanation:

I did it

9.6 Code Practice
Instructions
1
Declare a 4x 5 array called N

Please helppp

Answers

Answer:

See Explanation

Explanation:

The question lacks so many details, as the array type and the programming language is not stated.

Assume that, it is Java:

The rule to follow is:

Data-Type[][]Array-Name = new Data-type[rows][columns]

If the given information is for an array of type integer, the code will be;

int[][] N = new int[4][5]

Where

N = Array-Name

int = Data-type

4 and 5 are the dimensions of the array

which type of protocol allows for a secure data transmission using encryption methods?

Answers

Answer:

The Transport Layer Security (TLS) protocol adds a layer of security on top of the TCP/IP transport protocols. TLS uses both symmetric encryption and public key encryption for securely sending private data, and adds additional security features, such as authentication and message tampering detection

What does input allow a computer to do

Answers

In computer science, the general meaning of input is to provide or give something to the computer, in other words, when a computer or device is receiving a command or signal from outer sources, the event is referred to as input to the device.

can rank u r guys in rocket leagye

Answers

Ha ha ha ha ha ha ha ha

Members of the sales team use laptops to connect to the company network. While traveling, they connect their laptops to the internet through airport and hotel networks. You are concerned that these computers will pick up viruses that could spread to your private network. You would like to implement a solution that prevents the laptops from connecting to your network unless anti-virus software and the latest operating system patches are installed. Which solution should you use

Answers

Answer: Network access control (NAC)

Explanation:

The solution that should be used is the network access control. Network access control helps in keeping devices and users that are unauthorized out of ones private network.

In this case, since one will like to prevent the laptops from connecting to the network unless anti-virus software and the latest operating system patches are installed, then the network access control can be used. One can only give access to the device that it wants to give access to and prevent others from connecting.

List four things that must be taken into consideration when evaluating different resources of information (and explain ANY ONE from the list)​

Answers

Answer:

objectivitycurrencyaccuracyauthority

Explanation:

authority:is important to know if the information provided is reliable or not.

What is CPU
and it's functions

Answers

Answer:

CPU is considered as the brain of the computer. CPU performs all types of data processing operations. It stores data, intermediate results, and instructions (program). It controls the operation of all parts of the computer

Explanation:

hope it is helpful to you

You are an IT consultant. You are visiting a new client's site to become familiar with their network. As you walk around their facility, you note the following: When you enter the facility, a receptionist greets you and directs you down the hallway to the office manager's cubicle. The receptionist uses a notebook system that is secured to her desk with a cable lock. The office manager informs you that the organization's servers are kept in a locked closet. Only she has the key to the closet. When you arrive on site, you will be required to get the key from her to access the closet. She informs you that server backups are configured to run each night. A rotation of external USB hard disks are used as the backup media. You notice that the organization's network switch is kept in an empty cubicle adjacent to the office manager's workspace. You notice that a router/firewall/content filter all-in-one device has been implemented in the server closet to protect the internal network from external attacks. Which security-related recommendations should you make to this client

Answers

Answer: • Control access to the work area with locking doors and card readers.

• Relocate the switch to the locked server closet

Explanation:

Based on the information given, the security-related recommendations that should be made to this client include:

• Relocate the switch to the locked server closet: Since the organization's network switch is kept in an empty cubicle that is adjacent to the office manager's workspace, it can be easily accessible by anyone and this could lead to an external attack. Therefore, it should be moved to the locked server closet to prevent external attack.

• Control access to the work area with locking doors and card readers- Thus us necessary so that the work area won't be accessible to just anybody.

solve each ratio 35:7​

Answers

Answer:

5:1

Explanation:

Divide each side by 7

PLEASE HELP, Answer Correctly..Will give a bunch of brainlist points ​

Answers

Answer:

se ve muy dificil amiga

Explanation:

help Which of the following triangles can be proven similar through AA?
Question 1 options:

A)

image

B)

image

Answers

A as in Ate my food ya know
Other Questions
uld observe for the entire population represented by the volunteers if all members of this population tasted, respectively, the yogurt with and without the added calcium. If we had used the more accurate software approximation for the degrees of freedom, how would the 90% confidence interval compare to the one constructed with the more conservative value for degrees of freedom If log 7 =0.845, find log (7200). How do I write a conclusion? Lisa is on a trip of 1,300 miles. She has already traveled 50 miles. She has 5 days left in her trip. How many miles does she need to travel each day to complete the trip? A cereal box is 8 1/2 inches long, 2 1/2 inches wide, and 12 inches high. What is the volume of the box?The volume of the cereal box is blank cubic inches. Can i know what the true answer A line with a slope of 0 contains the point (3,4) . The point -2,? is also on the line. What is the missing y-coordinate?The solution is ___________please don't use files Which of the following statements best describes the spread of communism in the years immediately following World War II?The number of communist countries increased during these years.The number of communist countries decreased during these years.The number of communist countries stayed the same during these years.The number of communist countries increased in Asia but decreased in Europe. WORTH 20 POINTS. Remember my rules: Be first to answer correctly and have PATIENCE. ATLA Edition.What is the name of the sinister spirit also known as "the face stealer?"KohWan Shi TongTuiLa what is the answer to this? Can someone help? I need to the use the correct version of the word. Mrs. Patterson but a set of building blocks for her son each cube shaped block measured 4 cm on one side what is the volume of six building blocks PLEASE HELP 0ffering MAX POINTS please help im sorry that it's 4 problems Brainliest for correct answer PLS HELP! DONT SKIP PLS. Elena borrowed some money from her brother. She pays him back by giving him the same amount every week. The graph shows how much she owes after each week. 1. What is the slope of the line?2. Is the slope positive or negative?3. How much money did Elena borrow? (Hint: Vertical Intercept) Why would you expect to find a great deal ofparenchyma tissue in the roots of plants such as thecarrot, beet, and radish? Please help me with this homework The chocolate cake called to me, begging me to eat it is what?? While drawing a triangle, Michael decided that he wanted to have the longest side to measure 32 cm. Which pair of side lengths could create the other two sides of his triangle? (7TH GRADE MATH)