feat(r-1.3.py): constructed complete deliverable

This commit is contained in:
baphim
2026-09-03 23:17:51 -04:00
parent 5dc786d9f9
commit 79d565a1d9
2 changed files with 20 additions and 2 deletions
+17
View File
@@ -1,2 +1,19 @@
def minmax(data):
ordered = sorted(data)
data = (ordered[0], ordered[-1])
print(data)
user_data = input('Enter any amount of numbers, separated by spaces: ')
list_data = user_data.split()
float_data = []
for x in list_data:
try:
float_data.append(float(x))
except ValueError:
print(f'{x} is an invalid number')
minmax(float_data)
+3 -2
View File
@@ -11,7 +11,7 @@ error: having the colon directly after except on line 27 instead of after the
entire line.
"""
def minmax(*data):
def minmax(data):
ordered = sorted(data)
data = (ordered[0], ordered[-1])
print(data)
@@ -27,4 +27,5 @@ for x in list_data:
except ValueError:
print(f'{x} is an invalid number')
print(float_data)
minmax(float_data)