Features arrive on wildly different scales — age in years, income in tens of thousands — and any model that measures distance or shares one learning rate will quietly let the big one dominate. Min-max scaling squeezes everything onto [0, 1]:
1scaled = (value - min) / (max - min)
Task: write min_max_normalize(values) returning the scaled list, rounded to 4 decimal places.
0.0 and the largest exactly 1.0.This is the scaler that outliers punish hardest. One value ten times larger than the rest compresses everything else into a sliver near zero, which is the usual reason to reach for a z-score or a robust scaler instead.
Once your code passes every test, a reference solution shows up here so you can compare it with yours.
In raw numbers weight spans 60 while sweetness spans 6. The highlighted pair sits far apart on one track and almost together on the other.