TASK-
Write a Python program that asks user to enter a character and check whether a character is an alphabet or not.
CODE:
char=input("Enter the character: ") if (char>='A' or char>='a') and (char<='Z' or char<='z'):#check on character print("\n",char,"is a character") else: print("\n",char,"is not an alphabet") OUTPUT:
Enter the character: $
$ is not an alphabet
CODE:
char=input("Enter the character: ")
if (char>='A' or char>='a') and (char<='Z' or char<='z'):#check on character
print("\n",char,"is a character")
else:
print("\n",char,"is not an alphabet")
OUTPUT:
Enter the character: $
$ is not an alphabet
Such a good work keep trying and bringing new ideas
ReplyDeleteBest of luck ☺️
Nice work brother ! keep it up
ReplyDelete