Python Program To Find ASCII Value Of Character

Write Python code to find ASCII value of given character

# WAP to find ASCII value of given character

c = input("Enter a character :--> ")

print("ASCII value of '" + c + "' =", ord(c))

Output:

Enter a character :--> d
ASCII value of 'd' = 100

Enter a character :--> D
ASCII value of 'D' = 68

<< Previous | Next >>


Leave a Reply

Your email address will not be published.