Python Program To Find ASCII value of a character

Created with Sketch.

Python Program To Find ASCII value of a character

ASCII: ASCII is an acronym stands for American Standard Code for Information Interchange. In ASCII, a specific numerical value is given to different characters and symbols, for computers to store and manipulate.

It is case sensitive. Same character, having different format (upper case and lower case) has different value. For example: The ASCII value of “A” is 65 while the ASCII value of “a” is 97.

See this example:

  1. c = input(“Enter a character: “)
  2. print(“The ASCII value of ‘” + c + “‘ is”,ord(c))

Output:

Python Function Programs4

 

Leave a Reply

Your email address will not be published. Required fields are marked *