CJCoding With Joseph
15free / daySign inCreate account

Running Minimum

Write smallest(values: list[int]) -> int that returns the smallest value using one pass and a running lowest variable, without calling min() or sorted(). The list always has at least one value, so lowest starts as the first element and the loop runs over the slice values[1:]. Do NOT write a main block or any top-level test code; the tests construct the calls. Input: one line of space-separated integers; the tests print the value your function returns.

Expected Output:

1

= newline. The output ends with a newline — print one after the last line.

Hints3 available
Topics:
Data Structures & Algorithms
📥 Auto-Input:
8 3 5 1 9\n
This input is automatically fed to your program's stdin
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.