Smallest without min
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version.
This one builds on a lesson you haven't finished yet. Do that lesson first:
Python Basics · Functions →
Smallest without min
Return the smallest number in a list without using min.
It is the mirror image of the previous drill: start with the first item and replace it whenever you meet a smaller one.
Difficulty 3/5 · 200 coins + a small bonus on first completion today
Write smallest(nums) that returns the smallest number in the list, without using min.
Click Run to see the output here.