Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USING PYTHON 12- Write a function named wordLenghts, it takes two paramters: 1-inFilea string that is the name of the input file and 2-outFile a

USING PYTHON 12- Write a function named wordLenghts, it takes two paramters: 1-inFilea string that is the name of the input file and 2-outFile a string that is the name of the output file.The input file exits when wordLenghts is called; wordLenghts must create the file outFile. the input file contains only letters and white space. For each line of the input file , wordLenghts should identify the lenght of the longest word on the line and how many words of that lenght there are.It should write the lenght of the longest word, followed by a space, followed by how many words of that lenght there are on the line to a corresponding line in the outFile. If a line in the input file is empty the corresponding line of the output file should also be empty

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions

Question

=+b) Should the company send the fact-finding trip? Explain.

Answered: 1 week ago