Monday, October 11, 2021

Count Vowels in Python

 A simple program that will ask the user to give a string and then the program will count number of vowels in the given string by the user using Python programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.





Program Listing

# vowels.py
# Jake Rodriguez Pomperada, MAED-IT, MIT
# jakerpomperada.com and jakerpomperada.blogspot.com
# jakerpomperada@gmail.com
# Bacolod City, Negros Occidental
print()
print("\tCount Vowels in Python")
print()
val_str = input('Give a String : ')

vowels=0
for i in val_str:
if(i=='a' or i=='e' or i=='i' or i=='o' or i=='u' or i=='A' or i=='E' or i=='I' or i=='O' or i=='U'):
vowels=vowels+1
print()
print(f"Number of Vowels: {vowels}")
print()
print("\tEnd of Program")
print()

No comments:

Post a Comment