Discussions Events Study Material Jobs
Check if Character is a Vowel or Consonant using Python - Uniwaly

Explore Diverse Conversations

Check if Character is a Vowel or Consonant using Python

Posted By: UmairMehmood Published On: 13 June 2025 At: 13:26 PM

Input a single character and check if it is a vowel (a, e, i, o, u) or consonant
char = input("Enter a single character: ")
if len(char) == 1 and char.isalpha():
    if char.lower() in ['a', 'e', 'i', 'o', 'u']:
        print(f"{char} is a Vowel.")
    else:
        print(f"{char} is a Consonant.")
else:
    print("Please enter a single alphabet character only.")


Tags:

python check vowel python code
Login to like

Posted By:

Author Profile

UmairMehmood

11 days ago

Join the conversation!

Login to Comment

Discover More Articles

LECTURER (ENGLISH) PPSC Jobs 14/2025 in INSPECTORATE OF MINES, PUNJAB, MINES & MINERALS DEPARTMENT

New 30,000 Teaching Jobs Coming Soon on Merit : CM Punjab

Find Maximum and Minimum from List using Python

Schedule of assessment for the post of Enforcement officer and Investigation officer 2025

Global Scholarship Opportunities for 2025 – Fund Your Education Abroad

How to Choose the Best University in Saudi Arabia – A Guide for International Students

How to become a pro in CSS. A Road map to Becoming a CSS Pro.

Describe the process of microteaching by focusing its reflective nature in the development of novice teachers. What is the role of supervisor in this process?

Remove Duplicates from a List using Python

Write a program to calculate the sum of all elements in a list using a for loop using Python