18.Write a Python program to input any character and check whether it is alphabet, digit or special character.

Solution :- 

Static :- 

a = “A”
if a>=”1″ and a<=”9″:
print(“It is digit”)
elif a>=”A” and a<=”Z”:
print(“It is Alphabet”)
else:
print(“It is Special Character”)

Output :- 

Dynamic :- 

a = input(“Enter the Character :- “)
if a>=”1″ and a<=”9″:
print(“It is digit”)
elif a>=”A” and a<=”Z”:
print(“It is Alphabet”)
else:
print(“It is Special Character”)

Output :-