In the previous blog we found the remainder of the number. Now we will  find the ASCII value of the character in python.

What is ASCII  Table ?

The American Standard Code for Information Interchange (ASCII) is a character encoding standard for text files stored on computers and other devices. ASCII is a character set made up of 128 symbols that is a subset of Unicode. Letters (both capital and lowercase), numerals, punctuation marks, special characters, and control characters are among the symbols. Each symbol in the character set has an equivalent Hexadecimal and Octal value, as well as a Decimal value spanning from 0 to 127.

(Credits:-This image is taken from https://commons.m.wikimedia.org/wiki/File:ASCII-Table-wide.svg)

To find the ASCII value of the character .

chr = input("Enter a character: ")

print("ASCII value of  given character:",ord(chr))

Algorithm:-

1.Start 

2.Get the input of the character

3.Now to print the ASCII value of given character using ord() function. 

Explanation:- ord() is a function which is used to return the ascii value of the character this function accepts the character as an argument and returns the integer value of that particular character.

4.Stop 

Screenshot :-

1.Code Screenshot:-

2.Output Screenshot:-



In the next blog, we will see how to swap two numbers in python.