Init to comit it. Messy and in need of PR!
This commit is contained in:
19
1/23/main.py
Normal file
19
1/23/main.py
Normal 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)))
|
||||
Reference in New Issue
Block a user