SlideShare a Scribd company logo
1.
Longest Words
Write a Python program that reads words from a file (file name
user supplied) in which the words are stored one per line. Your
program will print to screen the ten longest words and gives
their file location in the original file, assuming the first word is
stored in location #1.
2.
File Reading
Write a Python program to read first n lines of a file. User will
supply name of file.

More Related Content

More from gasciognecaren

1.Rebecca SperryMar 29, 2020Mar 29 at 552pmManage Discussion .docx
1.Rebecca SperryMar 29, 2020Mar 29 at 552pmManage Discussion .docx1.Rebecca SperryMar 29, 2020Mar 29 at 552pmManage Discussion .docx
1.Rebecca SperryMar 29, 2020Mar 29 at 552pmManage Discussion .docx
gasciognecaren
 
1.Probability ConceptsDuring an epidemic of disease, a doctor se.docx
1.Probability ConceptsDuring an epidemic of disease, a doctor se.docx1.Probability ConceptsDuring an epidemic of disease, a doctor se.docx
1.Probability ConceptsDuring an epidemic of disease, a doctor se.docx
gasciognecaren
 
1.Find a test to assess, intelligence or education, find a similar a.docx
1.Find a test to assess, intelligence or education, find a similar a.docx1.Find a test to assess, intelligence or education, find a similar a.docx
1.Find a test to assess, intelligence or education, find a similar a.docx
gasciognecaren
 
1.Over the past few years, we have seen both emerging and reemerging.docx
1.Over the past few years, we have seen both emerging and reemerging.docx1.Over the past few years, we have seen both emerging and reemerging.docx
1.Over the past few years, we have seen both emerging and reemerging.docx
gasciognecaren
 
1.Ornette Coleman Lonely Womanhttpswww.youtube.comwatchv=D.docx
1.Ornette Coleman Lonely Womanhttpswww.youtube.comwatchv=D.docx1.Ornette Coleman Lonely Womanhttpswww.youtube.comwatchv=D.docx
1.Ornette Coleman Lonely Womanhttpswww.youtube.comwatchv=D.docx
gasciognecaren
 
1.In patients with acute respiratory distress syndrome (P), .docx
1.In patients with acute respiratory distress syndrome (P), .docx1.In patients with acute respiratory distress syndrome (P), .docx
1.In patients with acute respiratory distress syndrome (P), .docx
gasciognecaren
 
1.How is culture reflected in television and movies What relations.docx
1.How is culture reflected in television and movies What relations.docx1.How is culture reflected in television and movies What relations.docx
1.How is culture reflected in television and movies What relations.docx
gasciognecaren
 
1.How are the firm’s operational and key risk factors captured in th.docx
1.How are the firm’s operational and key risk factors captured in th.docx1.How are the firm’s operational and key risk factors captured in th.docx
1.How are the firm’s operational and key risk factors captured in th.docx
gasciognecaren
 
1.How do you define modernist literature and how does it relate to o.docx
1.How do you define modernist literature and how does it relate to o.docx1.How do you define modernist literature and how does it relate to o.docx
1.How do you define modernist literature and how does it relate to o.docx
gasciognecaren
 
1.GOAL STATEMENT Please complete the following goal statement.docx
1.GOAL STATEMENT Please complete the following goal statement.docx1.GOAL STATEMENT Please complete the following goal statement.docx
1.GOAL STATEMENT Please complete the following goal statement.docx
gasciognecaren
 
1.Functional Analysis Interview (FAI) is a type of structured in.docx
1.Functional Analysis Interview (FAI) is a type of structured in.docx1.Functional Analysis Interview (FAI) is a type of structured in.docx
1.Functional Analysis Interview (FAI) is a type of structured in.docx
gasciognecaren
 
1.Explain why the following communication is not a valid offer.docx
1.Explain why the following communication is not a valid offer.docx1.Explain why the following communication is not a valid offer.docx
1.Explain why the following communication is not a valid offer.docx
gasciognecaren
 
1.First, what is the Older Americans Act (OAA) What is the s.docx
1.First, what is the Older Americans Act (OAA) What is the s.docx1.First, what is the Older Americans Act (OAA) What is the s.docx
1.First, what is the Older Americans Act (OAA) What is the s.docx
gasciognecaren
 
1.Explain the pathophysiologic processes of select healt.docx
1.Explain the pathophysiologic processes of select healt.docx1.Explain the pathophysiologic processes of select healt.docx
1.Explain the pathophysiologic processes of select healt.docx
gasciognecaren
 
1.Explain why caregivers are considered patient advocates.     o.docx
1.Explain why caregivers are considered patient advocates.     o.docx1.Explain why caregivers are considered patient advocates.     o.docx
1.Explain why caregivers are considered patient advocates.     o.docx
gasciognecaren
 
1.Explain the diagnostic criteria for a mood disorder of your ch.docx
1.Explain the diagnostic criteria for a mood disorder of your ch.docx1.Explain the diagnostic criteria for a mood disorder of your ch.docx
1.Explain the diagnostic criteria for a mood disorder of your ch.docx
gasciognecaren
 
1.Class, what do you think might be some long term changes that happ.docx
1.Class, what do you think might be some long term changes that happ.docx1.Class, what do you think might be some long term changes that happ.docx
1.Class, what do you think might be some long term changes that happ.docx
gasciognecaren
 
1.Describe the difference between a vision statement and a missi.docx
1.Describe the difference between a vision statement and a missi.docx1.Describe the difference between a vision statement and a missi.docx
1.Describe the difference between a vision statement and a missi.docx
gasciognecaren
 
1.Briefly explain the role that faith played in U.S.      foreig.docx
1.Briefly explain the role that faith played in U.S.      foreig.docx1.Briefly explain the role that faith played in U.S.      foreig.docx
1.Briefly explain the role that faith played in U.S.      foreig.docx
gasciognecaren
 
1.Discussion Conduct research and summarize why do you beli.docx
1.Discussion Conduct research and summarize why do you beli.docx1.Discussion Conduct research and summarize why do you beli.docx
1.Discussion Conduct research and summarize why do you beli.docx
gasciognecaren
 

More from gasciognecaren (20)

1.Rebecca SperryMar 29, 2020Mar 29 at 552pmManage Discussion .docx
1.Rebecca SperryMar 29, 2020Mar 29 at 552pmManage Discussion .docx1.Rebecca SperryMar 29, 2020Mar 29 at 552pmManage Discussion .docx
1.Rebecca SperryMar 29, 2020Mar 29 at 552pmManage Discussion .docx
 
1.Probability ConceptsDuring an epidemic of disease, a doctor se.docx
1.Probability ConceptsDuring an epidemic of disease, a doctor se.docx1.Probability ConceptsDuring an epidemic of disease, a doctor se.docx
1.Probability ConceptsDuring an epidemic of disease, a doctor se.docx
 
1.Find a test to assess, intelligence or education, find a similar a.docx
1.Find a test to assess, intelligence or education, find a similar a.docx1.Find a test to assess, intelligence or education, find a similar a.docx
1.Find a test to assess, intelligence or education, find a similar a.docx
 
1.Over the past few years, we have seen both emerging and reemerging.docx
1.Over the past few years, we have seen both emerging and reemerging.docx1.Over the past few years, we have seen both emerging and reemerging.docx
1.Over the past few years, we have seen both emerging and reemerging.docx
 
1.Ornette Coleman Lonely Womanhttpswww.youtube.comwatchv=D.docx
1.Ornette Coleman Lonely Womanhttpswww.youtube.comwatchv=D.docx1.Ornette Coleman Lonely Womanhttpswww.youtube.comwatchv=D.docx
1.Ornette Coleman Lonely Womanhttpswww.youtube.comwatchv=D.docx
 
1.In patients with acute respiratory distress syndrome (P), .docx
1.In patients with acute respiratory distress syndrome (P), .docx1.In patients with acute respiratory distress syndrome (P), .docx
1.In patients with acute respiratory distress syndrome (P), .docx
 
1.How is culture reflected in television and movies What relations.docx
1.How is culture reflected in television and movies What relations.docx1.How is culture reflected in television and movies What relations.docx
1.How is culture reflected in television and movies What relations.docx
 
1.How are the firm’s operational and key risk factors captured in th.docx
1.How are the firm’s operational and key risk factors captured in th.docx1.How are the firm’s operational and key risk factors captured in th.docx
1.How are the firm’s operational and key risk factors captured in th.docx
 
1.How do you define modernist literature and how does it relate to o.docx
1.How do you define modernist literature and how does it relate to o.docx1.How do you define modernist literature and how does it relate to o.docx
1.How do you define modernist literature and how does it relate to o.docx
 
1.GOAL STATEMENT Please complete the following goal statement.docx
1.GOAL STATEMENT Please complete the following goal statement.docx1.GOAL STATEMENT Please complete the following goal statement.docx
1.GOAL STATEMENT Please complete the following goal statement.docx
 
1.Functional Analysis Interview (FAI) is a type of structured in.docx
1.Functional Analysis Interview (FAI) is a type of structured in.docx1.Functional Analysis Interview (FAI) is a type of structured in.docx
1.Functional Analysis Interview (FAI) is a type of structured in.docx
 
1.Explain why the following communication is not a valid offer.docx
1.Explain why the following communication is not a valid offer.docx1.Explain why the following communication is not a valid offer.docx
1.Explain why the following communication is not a valid offer.docx
 
1.First, what is the Older Americans Act (OAA) What is the s.docx
1.First, what is the Older Americans Act (OAA) What is the s.docx1.First, what is the Older Americans Act (OAA) What is the s.docx
1.First, what is the Older Americans Act (OAA) What is the s.docx
 
1.Explain the pathophysiologic processes of select healt.docx
1.Explain the pathophysiologic processes of select healt.docx1.Explain the pathophysiologic processes of select healt.docx
1.Explain the pathophysiologic processes of select healt.docx
 
1.Explain why caregivers are considered patient advocates.     o.docx
1.Explain why caregivers are considered patient advocates.     o.docx1.Explain why caregivers are considered patient advocates.     o.docx
1.Explain why caregivers are considered patient advocates.     o.docx
 
1.Explain the diagnostic criteria for a mood disorder of your ch.docx
1.Explain the diagnostic criteria for a mood disorder of your ch.docx1.Explain the diagnostic criteria for a mood disorder of your ch.docx
1.Explain the diagnostic criteria for a mood disorder of your ch.docx
 
1.Class, what do you think might be some long term changes that happ.docx
1.Class, what do you think might be some long term changes that happ.docx1.Class, what do you think might be some long term changes that happ.docx
1.Class, what do you think might be some long term changes that happ.docx
 
1.Describe the difference between a vision statement and a missi.docx
1.Describe the difference between a vision statement and a missi.docx1.Describe the difference between a vision statement and a missi.docx
1.Describe the difference between a vision statement and a missi.docx
 
1.Briefly explain the role that faith played in U.S.      foreig.docx
1.Briefly explain the role that faith played in U.S.      foreig.docx1.Briefly explain the role that faith played in U.S.      foreig.docx
1.Briefly explain the role that faith played in U.S.      foreig.docx
 
1.Discussion Conduct research and summarize why do you beli.docx
1.Discussion Conduct research and summarize why do you beli.docx1.Discussion Conduct research and summarize why do you beli.docx
1.Discussion Conduct research and summarize why do you beli.docx
 

Recently uploaded

Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
GeoBlogs
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
Steve Thomason
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 

Recently uploaded (20)

Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 

1.Longest WordsWrite a Python program that reads wor.docx

  • 1. 1. Longest Words Write a Python program that reads words from a file (file name user supplied) in which the words are stored one per line. Your program will print to screen the ten longest words and gives their file location in the original file, assuming the first word is stored in location #1. 2. File Reading Write a Python program to read first n lines of a file. User will supply name of file.