Python Program

Object:- Python Program to Find ASCII Value of Character

a = input("Enter a character: ")

print("The ASCII value of '" + a + "' is",ord(a))

Output

Enter a character: A
The ASCII value of 'A' is 65

Explanation

Here we have used ord() function to convert a character to an integer (ASCII value). This function actually returns the Unicode code point of that character.