Check whether a character entered by the user is alphabet or no

Banu Prakash M
Guvi
Published in
1 min readAug 22, 2019

Problem 4 :

In this problem you will learn how to check whether a character entered by the user is alphabet or no. This problem is solved using if…else statement.

Steps :

Get the input from the user.

If statement check whether the character is between a and z or between A and Z. If it is TRUE, it is an alphabet otherwise, it will enter into else statement & print “No”

Code Snippet for the above problem:

guvi=str(input())if((guvi>='a' and guvi<= 'z') or (guvi>='A' and guvi<='Z')):    print("Alphabet")else:    print("No")

--

--