Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(my code below, i only got the first one correct, the other 4 are incorrect for some reason. Please help, i think the issue is
(my code below, i only got the first one correct, the other 4 are incorrect for some reason. Please help, i think the issue is with the first couple lines)
import csv
#Get user input file_name = "input1.csv" file= open (file_name)
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: input 1. csv and the contents of input1.csv are: hello, cat, man, hey, dog, boy, Hello, man, cat, woman, dog, Cat, hey, boy the output is: Note: There is a newline at the end of the output, and input1.csv is available to download. 456480.3045654.93z zyy 7 7.8.1: LAB: Word frequencies (lists) 1/10 Downloadable files Only show failing tests Download this submission 1:Compare output 1/1 3:Compare output 0/2 Output differs. See highlights below. Special character legend 4:Compare output 0/2 Output differs. See highlights below. Special character legend
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started