Write one yourself
หน้านี้ต้องใช้เบราว์เซอร์ล่าสุด (รองรับ SharedArrayBuffer) กรุณาอัปเดต Chrome, Edge, Firefox หรือ Safari เป็นเวอร์ชันล่าสุด
อันนี้สร้างจากบทเรียนที่คุณยังไม่เสร็จสิ้น ให้ทำบทเรียนนั้นก่อน:
Python Basics · Functions →
เขียนเองหนึ่งตัว
เขียน biggest(a, b) ที่ส่งกลับค่าของสองจำนวนที่มากกว่า ห้ามใช้ max
Now all three parts are yours: the def line with its two names, an if/else inside it, and a return on each path. Every path must return something.
ความยาก 2/5 · 140 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
Write biggest(a, b) that gives back the larger of the two numbers. Do not use max.
คลิก Run เพื่อดูผลลัพธ์ที่นี่