Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using python Question 13 (20 points) Write a function named Linestats that finds the number of consonant and vowel letters on each line of a

Using python image text in transcribed
Question 13 (20 points) Write a function named Linestats that finds the number of consonant and vowel letters on each line of a file and writes those statistics to a corresponding line of a new file, separated by a space. Definitions: A vowel letter is one of a, e, i, o, u, along with the corresponding uppercase letters..A consonant letter is not a vowel letter. The function linestats takes two parameters: 1. inFile, a string, the name of an input file that exists before LineStats is called 2. outFile, a string, the name of an output file that Linestats creates and writes to Important: The input file contains only upper and lower case letters and white space (no punctuation marks or other special characters). For example, if the following is the content of the file mary. txt: Mary had a Little Lamb Its fleece was white as snow And everywhere that Mary went The Lamb was sure to go The following function call: >>> inFile mary.txt >>> outFile ,marySt at s . txt >>> lineStats(inFile, outFile) should create the file maryStats.txt with the content: 12 6 14 9 17 8 11 7

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions