small refactor + readme update

This commit is contained in:
2025-12-13 17:24:15 +01:00
parent fc3b0b79f7
commit 47da49e09d
4 changed files with 35 additions and 14 deletions

View File

@@ -1,5 +1,5 @@
#!/bin/python
from utils import parse_resistors
from utils import parse_values
def find_bests(desired_ratio, resistors):
# only keep the 5 best candidates
@@ -36,7 +36,7 @@ def get_ratio():
def get_inputs():
raw_input_resistors = input("Enter resistor values separated by spaces or commas: ")
resistors = parse_resistors(raw_input_resistors)
resistors = parse_values(raw_input_resistors)
desired_ratio = get_ratio()
return (resistors, desired_ratio)