Python Programming - Console Input/Output - Discussion

Discussion Forum : Console Input/Output - General Questions (Q.No. 65)
65.
How can you print the ASCII value of a character entered by the user?
ascii_value = ord(input("Enter a character: ")); print(ascii_value)
char = get_char_input(); print(ascii(char))
print(ord(input("Enter a character: ")))
ascii_code(get_input_char())
Answer: Option
Explanation:
To print the ASCII value of a character entered by the user, use ascii_value = ord(input("Enter a character: ")); print(ascii_value).
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.