Programming Examples

Python program to check character is alphabetic character or not


Write a Python program to  check character is alphabetic character or not

Solution

ch=input("Enter any alphabetic character : ")
if ch>='A' and ch<='Z':
    print("The Character is an upper case letter")
elif ch>='a' and ch<='z':
    print("The Character is an lower case letter")
else:
    print("This is not an alphabetic character!")
Output

Enter any alphabetic character : f

The Character is an lower case letter

>>> 

======================== 

Enter any alphabetic character : R

The Character is an upper case letter

>>> 

======================== 

Enter any alphabetic character : 4

This is not an alphabetic character!

>>> 

======================== 

Enter any alphabetic character : #

This is not an alphabetic character!

>>> 

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz