wap to input a character and check the input taken in character , digit or whitespace. your program should print appropriate message to the user.
Answers
Answered by
1
def char_type(c):
if c.isdigit():
return "digit"
if c.isspace():
return "whitespace"
return "character"
print(char_type((c := input("enter c: "))))
Similar questions
Math,
2 months ago
Geography,
2 months ago
Social Sciences,
2 months ago
Geography,
4 months ago
Social Sciences,
4 months ago
English,
10 months ago
Chemistry,
10 months ago
Chemistry,
10 months ago