Question: (PYTHON) Write a program that does the following: reads each line from a txt file and convert it to lowercase counts the number of instances

(PYTHON) Write a program that does the following:

reads each line from a txt file and convert it to lowercase

counts the number of instances of: the characters 'a', 'e','i','o' and 'u' in the file

creates a new file of file type .vowel_profile

print outs lines in the file indicating the frequencies of each of these vowels

Example input/output files:

INPUT:

WordPad can format and print text, including fonts, bold, italic, colored, and centered text, etc., but lacks intermediate features such as a spell checker, thesaurus, and the creation of tables. However WordPad can read, render, and save many Rich Text Format (RTF) features that it cannot create such as tables, strikeout, superscript, subscript, "extra" colors, text background colors, numbered lists, right or left indent, quasi-hypertext and URL linking, and various line spacings. Among its advantages are low system-resource usage, simplicity, and speed. Pasting into or from an HTML document such as from the internet or email will typically automatically convert most or all of it to RTF (although this is partially browser-dependent). As such, WordPad is well suited for taking notes, writing letters and stories, or for usage in various tablets, PCs, and smart phones. However, WordPad is underpowered for work that relies heavily on graphics or typesetting such as most publishing-industry requirements for rendering final hard copy.

OUTPUT:

This is a Vowel Profile file. A Frequency:70 E Frequency:84 I Frequency:56 O Frequency:55 U Frequency:31

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!