write a program in python a
to check whether a character entered by the user is an uppercase character or a lowercase character
Answers
Answered by
3
Explanation:
# Take input from user
ch = input("Enter any character : ")[0]
# Check for uppercase, lowercase
if ch.isupper() :
print("\n" + ch, "is UPPERCASE alphabet.")
elif ch.islower() :
print("\n" + ch, "is LOWERCASE alphabet.")
else :
print("\n" + ch, "is not an alphabet.")
Sample output:
Enter any caracter : k
k is LOWERCASE alphabet.
Similar questions