Programming Examples

Python program to find the ASCII Value of entered character


Write a program to input any Character and find its ASCII Value.

Solution

ch=input("Enter any Character : ")
ans=ord(ch) # ord is predefined function to find ascii value
print("ASCII Value of ",ch," is : ",ans)
Output

Enter any Character : A

ASCII Value of  A  is :  65

>>> 

========================= 

Enter any Character : a

ASCII Value of  a  is :  97

>>> 

========================= 

Enter any Character : 0

ASCII Value of  0  is :  48

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz