Answer to Question #102357 in Python for Brenda flores

Question #102357
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")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS