Letter, Digit or Special Character
You are given a character as input. Check if the given input is a
The first line of input is a single character
In the given example character is
9. So, the output should be Digit.
ch = input() if len(ch) == 1: if ch.isdigit(): print('Digit') elif ch.upper()!=ch: print('Lowercase Letter') elif ch.lower()!=ch: print('Uppercase Letter') else: print('Special Character')
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments