Python program to check whether the character is an alphabet or not

     

Python program to check whether the character is an alphabet or not 


Program:

ch=input("Enter any character:")
if((ch>='a' and ch<='z') or (ch>='A' and ch<='Z')):
    print(ch," is an alphabet")
else:
  
    print(ch,"is not an alphabet")



OutPut:
Enter any character:2
2 is not an alphabet

Enter any character:d
d  is an alphabet






No comments:

Post a Comment