0:00
Hey guys in this video I'm going to code a Python program that would accept a list of words
0:10
probably a text file containing a list of words and then it's going to calculate the
0:17
the valse percentage in each word and it's just going to write it down onto the right of
0:23
each word and then it's going to provide you with the edited file so without further
0:30
do let's get started well that is UTF8 so encoding you do it right now we're
0:38
going to have a list that's going to hold all the lines from the text file that I'm
0:44
going to extract so we have a list here our lines and then we have a sorted list
0:51
right that's going to contain all the sorted lines right so short list and then
0:57
we were going to open up our original text file. And after reading that I split the entire by back
1:34
by back slash end so that I can grab each line and store it in all lines list right
1:41
that's it I just closed the file and now we're going to find out the VAL percentage
2:11
by the count A and we're going to write down all the vowels and then just add up the count
2:22
So that it Now we going to calculate the percentage of of vowels in each word right so val divided by line length
2:48
then we're going to multiply a hundred and the i right so then just in into that sort list we're going to append that percentage
2:58
right and we're going to also add up a percentage symbol and then and then some blank spaces
3:28
So I just sorted the entire list and now it's time to shift the percentage symbol to the right
3:39
Okay, so we're gonna split it first. Edit, edited file
3:52
I just going to write into another file and then and then I just modified its order because I want the percentage on the right side now her deal I didn
4:21
mention the edited files path so you can just have a new variable here right so
4:31
we're gonna we're gonna link to that edited file so edited file so just
4:37
provide the path that you would like to So now let's rent this chord