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!
>>>Â