This commit is contained in:
Joe S
2021-01-08 20:40:37 -05:00
parent 40a9e4776c
commit affefca9a6

View File

@@ -0,0 +1,19 @@
user_int = 0
while user_int not in range(32, 126):
user_int = int(input('Enter integer (32 - 126):\n'))
user_float = float(input('Enter float:\n'))
user_char = ''
while len(user_char) != 1:
user_char = str(input('Enter character:\n'))
user_string = str(input('Enter string:\n'))
results = [user_int, user_float, user_char, user_string]
print(*results)
results.reverse()
print(*results)
print('{0} converted to a character is {1}'.format(user_int, chr(user_int)))