Answer No : 17 :
fileName = str(input("Enter the Name of File:"))
f1 = open(fileName, "r")
a=f1.read()
f1.close()
totalvovel = 0
al=0
bs=0
lcl=0
ucl=0
totalvovel = 0
print("File Content :")
print(a)
vowels = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U']
for char in a:
if char in vowels:
totalvovel = totalvovel+1
if char.isalpha():
al=al+1
if char==" ":
bs=bs+1
if char.isupper():
lcl = lcl + 1
if char.isupper():
ucl = ucl + 1
cw=a.count("hello")
print("Total alfabate :",al)
print("Total blank space :",bs)
print("Total upper case :",lcl)
print("Total lower case:",ucl)
print("Total Vowels are:",totalvovel)
print("Total occurrences of a word “hello” :",cw)