Write a Python program to check whether a character is an alphabet or not

Write a Python program to check whether a character is an alphabet or not

Program
def myfun(): 
    ch = input("Enter any character : ");

    if ch == '0':
        print("You Enter '0'.");
        exit();
    else:
        if((ch>='a' and ch<='z') or (ch>='A' and ch<='Z')):
            print(ch, "is an alphabet.");
        else:
            print(ch, "is not an alphabet.");
                
if __name__=="__main__":
    myfun()


Output:

Enter any character: R
R is an alphabet.



More Questions


23 . Write a Python program to check whether a character is an alphabet or not
24 . Write a Python program to count number of digits in an integer
25 . Write a Python program to print fibonacci series
26 . Write a Python program to print reverse number
27 . Write a Python Program to print Palindrome numbers from 1 to 100
28 . Write a Python Program to find the factorial of a number using recursion
29 . Write a Python Program to check armstrong number of n digits
30 . Write a program to check armstrong numbers in certain interval
31 . Write a program to merging dictionaries
32 . Write a program to print swapping variables
33 . Write a python program to counting item occurrences