SlideShare a Scribd company logo
1 of 1
Download to read offline
In Python please
10.9LAB: Word frequencies (lists) Write a program that first reads in the name of an input file and
then reads the file using the csv.reader0 method. The file contains a list of words separated by
comrmas. The program must cutput the words and their frequencies ithe number af timles each
word appears in the file) without any duplicates. Ex: If the input is. inputit.1. and the contents of
input 1.csv are: hellu, cal, man, hey, dog, ioy, Hellu, man, cal, wuma:, doy, CaL, heY, buY the
output is. hel1n-1 cat - 2 man 2 hey - 2 dog - 2 boy - 2 He11o - 1 waman - 1 Cat - 1

More Related Content

More from adithiyaatextile

In Python I am struggling with getting the functions to wor.pdf
In Python I am struggling with getting the functions to wor.pdfIn Python I am struggling with getting the functions to wor.pdf
In Python I am struggling with getting the functions to wor.pdf
adithiyaatextile
 

More from adithiyaatextile (20)

In the implementation of the ordinary Queue if the dequeue .pdf
In the implementation of the ordinary Queue if the dequeue .pdfIn the implementation of the ordinary Queue if the dequeue .pdf
In the implementation of the ordinary Queue if the dequeue .pdf
 
In the formula IPAT which of the following would be repres.pdf
In the formula IPAT which of the following would be repres.pdfIn the formula IPAT which of the following would be repres.pdf
In the formula IPAT which of the following would be repres.pdf
 
In the game Sorry players draw a card and move around the.pdf
In the game Sorry players draw a card and move around the.pdfIn the game Sorry players draw a card and move around the.pdf
In the game Sorry players draw a card and move around the.pdf
 
In the following web login system Assuming that the applica.pdf
In the following web login system Assuming that the applica.pdfIn the following web login system Assuming that the applica.pdf
In the following web login system Assuming that the applica.pdf
 
In the following table provide a short explanation of how ea.pdf
In the following table provide a short explanation of how ea.pdfIn the following table provide a short explanation of how ea.pdf
In the following table provide a short explanation of how ea.pdf
 
In the field of anthropology primatology and genetics ther.pdf
In the field of anthropology primatology and genetics ther.pdfIn the field of anthropology primatology and genetics ther.pdf
In the field of anthropology primatology and genetics ther.pdf
 
In the film The Ghosts of Stonehenge it is suggested that.pdf
In the film The Ghosts of Stonehenge it is suggested that.pdfIn the film The Ghosts of Stonehenge it is suggested that.pdf
In the film The Ghosts of Stonehenge it is suggested that.pdf
 
In the fall of 2021 the United States enacted a 12 trilli.pdf
In the fall of 2021 the United States enacted a 12 trilli.pdfIn the fall of 2021 the United States enacted a 12 trilli.pdf
In the fall of 2021 the United States enacted a 12 trilli.pdf
 
In the early 2000s manatee numbers in Florida were hoverin.pdf
In the early 2000s manatee numbers in Florida were hoverin.pdfIn the early 2000s manatee numbers in Florida were hoverin.pdf
In the early 2000s manatee numbers in Florida were hoverin.pdf
 
In the 1960s the Supreme Court of Chief Justice Earl Warren.pdf
In the 1960s the Supreme Court of Chief Justice Earl Warren.pdfIn the 1960s the Supreme Court of Chief Justice Earl Warren.pdf
In the 1960s the Supreme Court of Chief Justice Earl Warren.pdf
 
In Python I am struggling with getting the functions to wor.pdf
In Python I am struggling with getting the functions to wor.pdfIn Python I am struggling with getting the functions to wor.pdf
In Python I am struggling with getting the functions to wor.pdf
 
In the Bully leader election algorithm if a process receive.pdf
In the Bully leader election algorithm if a process receive.pdfIn the Bully leader election algorithm if a process receive.pdf
In the Bully leader election algorithm if a process receive.pdf
 
In silkmoths Bombyx mori red eyes re and whitebanded w.pdf
In silkmoths Bombyx mori red eyes re and whitebanded w.pdfIn silkmoths Bombyx mori red eyes re and whitebanded w.pdf
In silkmoths Bombyx mori red eyes re and whitebanded w.pdf
 
In the article Incorporating Country Risk in the Valuation .pdf
In the article Incorporating Country Risk in the Valuation .pdfIn the article Incorporating Country Risk in the Valuation .pdf
In the article Incorporating Country Risk in the Valuation .pdf
 
In our projects on the significant events in Operations Mana.pdf
In our projects on the significant events in Operations Mana.pdfIn our projects on the significant events in Operations Mana.pdf
In our projects on the significant events in Operations Mana.pdf
 
In SQLserver This criterion is linked to a Learning OutcomeP.pdf
In SQLserver This criterion is linked to a Learning OutcomeP.pdfIn SQLserver This criterion is linked to a Learning OutcomeP.pdf
In SQLserver This criterion is linked to a Learning OutcomeP.pdf
 
In some respects the growing population of seniors is consi.pdf
In some respects the growing population of seniors is consi.pdfIn some respects the growing population of seniors is consi.pdf
In some respects the growing population of seniors is consi.pdf
 
In Sanger DNA sequencing the termination of the growing cha.pdf
In Sanger DNA sequencing the termination of the growing cha.pdfIn Sanger DNA sequencing the termination of the growing cha.pdf
In Sanger DNA sequencing the termination of the growing cha.pdf
 
in reviewing the admission records of a 16 year old male cli.pdf
in reviewing the admission records of a 16 year old male cli.pdfin reviewing the admission records of a 16 year old male cli.pdf
in reviewing the admission records of a 16 year old male cli.pdf
 
In Singapore the main language is English but only about 3.pdf
In Singapore the main language is English but only about 3.pdfIn Singapore the main language is English but only about 3.pdf
In Singapore the main language is English but only about 3.pdf
 

Recently uploaded

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 

Recently uploaded (20)

Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 

In Python please 109LAB Word frequencies lists Write a p.pdf

  • 1. In Python please 10.9LAB: Word frequencies (lists) Write a program that first reads in the name of an input file and then reads the file using the csv.reader0 method. The file contains a list of words separated by comrmas. The program must cutput the words and their frequencies ithe number af timles each word appears in the file) without any duplicates. Ex: If the input is. inputit.1. and the contents of input 1.csv are: hellu, cal, man, hey, dog, ioy, Hellu, man, cal, wuma:, doy, CaL, heY, buY the output is. hel1n-1 cat - 2 man 2 hey - 2 dog - 2 boy - 2 He11o - 1 waman - 1 Cat - 1