Vowel or Consonant

    0

    0

    Mahendra Kumar

    beginnercharAnalysis

    Python Program to Check Whether a Character is Vowel or Consonant

    # take input
    ch = input('Enter any character: ')
    # check vowel or constant and display result
    if(ch=='A' or ch=='a' or ch=='E' or ch =='e' or ch=='I' 
          or ch=='i' or ch=='O' or ch=='o' or ch=='U' or ch=='u'):
        print(ch, "is a Vowel")
    else:
        print(ch, "is a Consonant")
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.