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

Sort a List Manual Bubble Sort using Loops in Python

بزرگ شہریوں کے لیے چہرے کی شناخت کی ٹیکنالوجی متعارف

Visiting / Teaching Faculty Jobs in University of Veterinary and Animal Sciences Lahore 2025

Rescue 1122 Punjab Jobs 2025 For Multiple Categories

The owner of this website has banned the autonomous system number (ASN) your IP address is in (*****) from accessing this website

Communication & Coordination Officer - The Urban Unit Jobs 2025

Why Google stopped showing the card of summary of your site's performance on Google Search ?

What is a NullPointerException, and how do I fix it?

Content Writing Prompt Using ChatGPT and DeepSeek

Warning! Avoid Fraudulent Job Offers