Write a program that asks the user for a number. If the number is between 1 and 255, the program outputs the corresponding ASCII character. If it is outside of that range, the program outputs Out of range.
1
Expert's answer
2020-02-05T07:54:04-0500
i = int(input("Enter a number: "))
if i >= 1 and i <= 255:
print(chr(i))
else:
print("Out of range")
Comments
Leave a comment