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. · לחץ על הרץ כדי לראות את התוצא כאן.