Computer Science, asked by vipersid2904, 3 months ago

Write a python program to print whether the data inputed by the user is a digit , space or and alphabet​

Answers

Answered by crankybirds30
0

Answer:

# Take character input from user ch = input("Enter any character : ") # Check for alphabet and digit. if ch[0]. isalpha() : print("\n" + ch[0], "is A ALPHABET.") elif ch[0]. isdigit() : print("\n" + ch[0], "is A DIGIT.") else : print("\n" + ch[0], "is A SPECIAL CHARACTER.")

Answered by Alaina6
1

# Take character input from user ch = input("Enter any character : ") # Check for alphabet and digit. if ch[0]. isalpha() : print("\n" + ch[0], "is A ALPHABET.") elif ch[0]. isdigit() : print("\n" + ch[0], "is A DIGIT.") else : print("\n" + ch[0], "is A SPECIAL CHARACTER.")

Similar questions