Skip to content · ⁨الانتقال إلى المحتوى⁩

Largest without max · ⁨الأكبر بدون دالة max⁩

English

Largest without max

Return the largest number in a list without using Python's max.

Keep the best value found so far, starting with the first item. Walk through the list and replace the best value whenever you meet a bigger one. When the loop ends, the best value is the largest.

العربية

الأكبر بدون max

أعد أكبر رقم في قائمة دون استخدام دالة max الخاصة بـ Python.

احتفظ بأفضل قيمة تم العثور عليها حتى الآن، بدءًا من العنصر الأول. تجول عبر القائمة واستبدل أفضل قيمة كلما واجهت قيمة أكبر. عندما تنتهي الحلقة، تكون أفضل قيمة هي الأكبر.

Log in or create account · ⁨تسجيل الدخول أو إنشاء حساب⁩

IGCSE, A-Level & AP