This assignment will have you read from a file and use functions. The following functions can be present in your program file in any order, but the last line of your program must be main() so that you are calling your main program to cause it to execute.

main()

This function prompts the user for a file name and for an integer that defines how many characters are in a long word. It will read from that file (which contains words, possibly more than one per line) and reports the total number of words, the total number of words beginning with a vowel (aeiouAEIOU), the total number of words starting with T (upper or lower case) and the number of words longer than the length defined with the second input above.

startsWithVowel(word)

Return True if word begins with a vowel, False otherwise.

startsWithT(word)

Return True if word begins with T or t, False otherwise.

endsWithVowel(word)

Return True if word ends with a vowel, False otherwise.

endsWithT(word)

Return True if word ends with T or t, False otherwise.

isLong(word, length)

Return True if the length of word is greater then length, False otherwise.

Different data files will be used when your program is tested.

A sample file and the resulting output are shown below.

This is file: data.txt

This document
contains
blank lines and

some
number of
words to
check the
Alphabet
tests

Notice that it contains no punctuation
This is the user input and output

File name? data.txt
# Characters in a long word? 7

Report:
# words that start with a vowel: 4
# words that start with T: 5
# words that end with a vowel: 5
# words that end with T: 4
# long words: 5
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.