Write a program that asks the user for a number. If it is between 1 and 255, output the corresponding ASCII character. If it is outside of that range, output "Out of range"
Sample Run
Enter a number between 1 and 255: 97
a
Enter a number between 1 and 255: 256
Out of range
1
Expert's answer
2019-11-05T07:41:56-0500
while True:
char = int(input("Enter a number between 1 and 255: "))
if 1 <= char <= 255:
x = chr(char)
print(x)
break
else:
print("Out of range")
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment