Alphabet

Python program for display all Alphabets using ASCII value

Python program for display all Alphabets using ASCII value

In this article, we will discuss the concept of python Program for Display all Alphabets  using ASCII value

In this post, we are going to learn how to display all the upper case(A to Z) and lower case (a to z) Alphabets using ASCII value  in Python programming language

Alphabets from ASCII
  • ASCII value of upper case Alphabets letters are between 65 – 90
  • ASCII value of lower case Alphabets letters are between 97 – 122

Program for Display all upper case and lower case Alphabets

The program displays all the upper case and lower case alphabet letters between a to z using for loop in Python language

Program 1

#printing all upper case alphabets
print("All upper case alphabets are: ")
for i in range(65,91):
  print(chr(i),end=' ')
  #displaying all upper case Alphabets with space
  #Ascii value of upper case alphabtes 65 - 91

  #printing all lower case alphabets
print("\nAll lower case alphabets are: ")
for i in range(97,123):
  print(chr(i),end=' ')
  #displaying all lower case Alphabets with space
    #Ascii value of lower case alphabtes 97 - 123

When the above code is executed it produces the following result

All upper case alphabets are:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

All lower case alphabets are:
a b c d e f g h i j k l m n o p q r s t u v w x y z

 

In the above program, we are using a for loop, this is used to print upper case Alphabet letters or lower case Alphabet letters using ASCII value

 

Suggested for you

for loop in Python language

while loop in Python language

 

 

Similar post

Java program to print all upper case and lower case Alphabets

C++ program to print all upper case and lower case Alphabets

C program to print all upper case and lower case Alphabets

 

C Program for Display Alphabets in Java using ASCII value

Java Program for Display Alphabets in Java using ASCII value

C++ Program for Display Alphabets in Java using ASCII value

Python Program for Display Alphabets in Java using ASCII value

 

C++ Program for Display Alphabets using ASCII value
Java program to count vowels and consonants in a string
Karmehavannan

I am Mr S.Karmehavannan. Founder and CEO of this website. This website specially designed for the programming learners and very especially programming beginners, this website will gradually lead the learners to develop their programming skill.

Recent Posts

C# inverted full pyramid star pattern

C# inverted full pyramid star pattern In this article, we will discuss the concept of…

3 weeks ago

C# Full Pyramid star pattern program

C# Full Pyramid star pattern program In this article, we will discuss the concept of…

1 month ago

Program to count vowels,consonants,words, characters and space in Java

Program to count vowels, consonants, words, characters and space in Java In this article, we…

1 month ago

How to print multiplication table using Array in C++ language

How to print multiplication table using Array in C++ language In this post, we will…

1 month ago

C Program to multiplication table using Array

C Program to multiplication table using Array In this tutorial , we will discuss about…

2 months ago

Java program to check odd or even using recursion

Java program to check odd or even using recursion In this tutorial, we discuss a…

2 months ago