Hey If you are beginner and want to learn a python then you are on right path. Learn basic as well as advanced programming in Python.

Search

Python program to check whether given character is a digit ,symbol or uppercase or lowercase.

PYTHON PROGRAM



"""

Program for checking whether enterd character is, Uppercase, lowercase or digit or Symbol

"""

c =input("Enter a character:")

if(ord(c)>=65) and (ord(c)<=90):

print("It is Uppercase.")

elif(ord(c)>=97) and (ord(c)<=127):

print("It is Lowercase.")

elif(ord(c)>=48)and(ord(c)<=57):

print ("It is digit.")

else:

print ("It is Symbol.")



    

*** Input && Output ***
























No comments:

Post a Comment

let me know which type examples you want to comment me.