BeginnersBook

  • Home
  • Java
    • Java OOPs
    • Java Collections
    • Java Examples
  • C
    • C Examples
  • C++
    • C++ Examples
  • DBMS
  • Computer Network
  • Python
    • Python Examples
  • More…
    • jQuery
    • Kotlin
    • WordPress
    • SEO
    • JSON
    • JSP
    • JSTL
    • Servlet
    • MongoDB
    • XML
    • Perl

Python Program to Check Alphabet

Last Updated: January 3, 2018 by Chaitanya Singh | Filed Under: Python Examples

In this post, we will write a Python program to check whether the entered character is an Alphabet or not.

Python Code

In this program, user is asked to enter a character and the input character is stored in a variable. The program checks whether the entered character lies in the range of lowercase or uppercase alphabets, if it does then the program displays the message that the “character is an Alphabet” else it displays that the “character is not an Alphabet”.

# taking user input
ch = input("Enter a character: ")
if((ch>='a' and ch<= 'z') or (ch>='A' and ch<='Z')):
    print(ch, "is an Alphabet")
else:
    print(ch, "is not an Alphabet")

Output:
Python Program to check Alphabet

Related Posts:

  1. C Program to check whether a character is an Alphabet or not
  2. Python program to check if a number is prime or not
  3. Python program to check even or odd
  4. Python program to add two numbers
  5. Python program to print Hello World

Top Related Articles:

  1. Python Program to Check If number is Even or Odd
  2. Python Program to Add Two Numbers
  3. Python Program to Check If a number is Prime or not
  4. Python Program to Convert Decimal to Hexadecimal
  5. Python Program to Convert Celsius To Fahrenheit and Vice Versa

About the Author

I have 15 years of experience in the IT industry, working with renowned multinational corporations. Additionally, I have dedicated over a decade to teaching, allowing me to refine my skills in delivering information in a simple and easily understandable manner.

– Chaitanya

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Copyright © 2012 – 2025 BeginnersBook . Privacy Policy . Sitemap