Smallest without min · 不用 min 找最小值
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · 此页面需较新浏览器(支持 SharedArrayBuffer)。请升级 Chrome、Edge、Firefox 或 Safari 至最新版本。
This one builds on a lesson you haven't finished yet. Do that lesson first: · 此任务基于您尚未完成的课程。请先完成以下课程:
Python Basics · Python 基础 · Functions · 函数 →
English
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.
中文
不用 min 找最小值
不使用 min,返回列表中最小的数。
它和上一题正好相反:从第一个元素开始,每遇到更小的数就把它换掉。
Write smallest(nums) that returns · 返回值 the smallest number in the list, without using min. · 编写 smallest(nums),返回列表中最小的数,不能使用 min。
Click Run to see the output here. · 点击“运行”查看此处输出。