feat(r-1.3_scratch.py): attempt 1 at formatting input string to float

This commit is contained in:
baphim
2026-09-03 22:37:47 -04:00
parent 748913cd91
commit 57a4523265
+7 -6
View File
@@ -4,15 +4,16 @@
Created on Wed Sep 2 22:49:38 2026 Created on Wed Sep 2 22:49:38 2026
@author: joseph @author: joseph
- I got very tired and decided to scrap the whole process I've been chasing. - I figured out the function after some rest. Now I want to sort out an input
I will start again soon, scrapping the input loop idea and just focusing on method that allows for any number of floats.
function itself.
""" """
def minmax(*data): def minmax(*data):
ordered = sorted(data) ordered = sorted(data)
data = (ordered[0], ordered[-1]) data = (ordered[0], ordered[-1])
print(data) print(data)
minmax(24, 3, 84.26, -15) user_data = float(input('Enter any amount of numbers, separated by spaces: '))
list_data = user_data.split()
minmax(list_data)