Question: Python language: Your program will take a file name from user and find out following information and display it. Number of lines, number of vowels,

Python language:

Your program will take a file name from user and find out following information and display it.

Number of lines, number of vowels, number of consonants, and number of numerical characters

Also, ask user if user wants to repeat and depends on the answer, your program needs to terminate or repeat.

If user enters wrong information (wrong name of the file or non-existing file name), your program needs to display message and ask for correct input. Your program should not generate traceback message with any input. Provide comments for program

Python language: Your program will take a file name from user and

OUTPUT: - Blue bold text is the user's input( Red, italicized portion is user input) Please enter file name: ../sample1.txt File ../sample1.txt has 16 lines. File ../sample1.txt has 286 vowels File ../sample1.txt has 504 consonants File ../sample1.txt has 0 numerical characters Do you want to try it again? (y or n) y Please enter file name: ../sample2.txt File ../sample2.txt has 18 lines. File ../sample2.txt has 97 vowels File ../sample2.txt has 176 consonants File ../sample2.txt has 93 numerical characters Do you want to try it again? (y or n) n Thanks for playing! >>>

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!