;

Python Program to Find the Character from a Given ASCII Value


Tutorialsrack 22/04/2020 Python

In this Python program, we will learn how to find the character from a given ASCII value and display it.

ASCII stands for American Standard Code for Information Interchange. It is a character encoding standard for electronic communication. ASCII only encodes 128 characters. Each symbol in the character set can be represented by a Decimal value ranging from 0 to 127, as well as equivalent Hexadecimal and Octal values. For example, the ASCII value of the character ‘A’ is 65

In this program, we will pass the ASCII value to find the character and for converting the ASCII value to its character, we will use the chr() function. In the chr() function, we will pass the ASCII values as parameters and get the output as character or symbol.

Here is the code of the program to find the character from a given ASCII value and display it.

Python Program to Find the Character from a Given ASCII Value
# Python Program to Find the Character from a Given ASCII Value

# To Take the Input from the User
ASCII_Value = int(input("Enter the ASCII Value: "))

print("The Character from Given ASCII value is", chr(ASCII_Value))
Output

Enter the ASCII Value: 65

The Character from Given ASCII value is A

 

Enter the ASCII Value: 56

The Character from Given ASCII value is 8

 

Enter the ASCII Value: 85

The Character from Given ASCII value is U


Related Posts



Comments

Recent Posts
Tags