Python Program to Check if Given Input is a Letter, Digit or Special Character

 

Letter, Digit or Special Character

You are given a character as input. Check if the given input is a Lowercase Letter or Uppercase Letter or Digit or a Special Character

Input

The first line of input is a single character N

Explanation

In the given example character is 9.So, the output should be Digit

Sample Input 1

9

Sample Output 1

Digit

Sample Input 2

A

Sample Output 2

Uppercase Letter

Code:

char=input()
if char.islower():
    print("Lowercase Letter")
elif char.isupper():
    print("Uppercase Letter")
elif char.isdigit():
    print("Digit")
else:
    print("Special Character")

Comments

Popular posts from this blog

CODING ASSIGNMENT 4

CODING PRACTICE 11 Music Page

CODING ASSIGNMENT 3