Question
Find the vowels project In this project you need to write script that will get the contents of a file (the file will be hard
Find the vowels project
In this project you need to write script that will get the contents of a file (the file will be hard coded in the script) and counts the number of characters (spaces count as a character) the script will also count all the vowels (a, e, i, o, and u but not y). When done the script will output the total number of characters and total number of vowels, on the second line it will show the individual count for each a, e, i, o and u. The file has been provided to use with this assignment it is the only file you are to use (the file is named sampletext.txt).
For example, if you have the following line of text I love Linux
The output from the script will be: The total number of characters is 12 with 5 vowels. The breakdown of vowels (a,e,i,o,u) is 0 a's, 1 e's, 2 i's, 1 o's and 1 u's
NOTE: I would use the above text "I love Linux" as a test file to make sure your script is working correctly.
**sampletext.txt information:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec mollis, magna id vulputate hendrerit, mauris odio semper sapien, id consectetur odio leo a mi. Nullam velit dui, auctor quis purus eget, posuere mollis orci. Maecenas magna nunc, tincidunt interdum felis vitae, tristique accumsan ligula. Praesent a libero id dui rhoncus eleifend. Sed efficitur orci eu dui luctus, at laoreet nisl ornare. Duis faucibus finibus ipsum eget convallis. Ut eleifend sem ut dolor ornare, et venenatis dui mattis. Praesent id metus ut tellus malesuada accumsan rutrum ac ex. Mauris vestibulum hendrerit auctor. Ut porttitor eros nunc, et vehicula odio ultricies ac. Cras elit orci, facilisis vitae metus ac, faucibus ultricies eros. Vivamus eu feugiat ligula. Suspendisse pellentesque eget erat vitae cursus. In efficitur, lorem vel elementum iaculis, quam odio suscipit ex, eget pulvinar velit felis eget neque. Suspendisse sollicitudin congue dolor, ut varius justo. Aenean sodales lectus ut ligula ullamcorper, a semper sem pharetra. Mauris pharetra suscipit diam, sit amet euismod magna consequat sit amet. Phasellus sed lorem sit amet dolor ultrices accumsan. Phasellus non dui sed lacus mollis vestibulum. Nulla lectus massa, congue ac justo vel, accumsan pharetra nisl. Proin porta iaculis enim a cursus. Suspendisse est quam, vehicula quis consectetur nec, rutrum eu odio. Vestibulum luctus blandit facilisis. Pellentesque suscipit dolor et semper consequat. Phasellus finibus enim id orci iaculis vestibulum. Praesent facilisis porta odio, ac suscipit lorem tincidunt quis. Phasellus suscipit, enim nec volutpat pharetra, enim augue imperdiet metus, quis maximus risus metus vitae purus. Duis sit amet porttitor nunc. Maecenas vitae sollicitudin nulla, at maximus est.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started