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 · 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) ที่ คืนค่า เลขที่มีค่าน้อยที่สุด trongรายการ โดยไม่ใช้ min
Click Run to see the output here. · คลิก Run เพื่อดูผลลัพธ์ที่นี่