1. Python

Python | Program to Find ASCII Value of Character

Every hardware device does not understand any upper level code. For example x = 10 in Python means x is a variable having value 10. But internally hardware doesn’t understand 10 or x, rather it understands only ones/zeros(10000010010). That’s why American Standards Association has defined some rules which state that any character would be assigned a specific number which internally will translate to zeros/ones. These rules are known as ASCII – American Standard Code For Information Interchange. For example – Character c is equivalent to 112 as per ASCII.
So c => 112(As Per ASCII) =>Some Sequence of ones/zeros(internally)

Python Code for Finding ASCII Value of Character

# Finding ASCII value of Character using Python Code

some_character = "d"

# Printing out ASCII value of some_character

print("ASCII value of character is =>", ord(some_character))

Output of Above Code

ASCII value of character is => 100
Comments to: Python | Program to Find ASCII Value of Character

Your email address will not be published.