Skip to content · ⁨Passer au contenu⁩

Largest without max · ⁨Le plus grand sans 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.

Français

Plus grand sans max

Retourne le plus grand nombre d'une liste sans utiliser la fonction Python max.

Conservez la meilleure valeur trouvée jusqu'ici, en commençant par le premier élément. Parcourez la liste et remplacez la meilleure valeur chaque fois que vous rencontrez un nombre plus grand. Quand la boucle se termine, la meilleure valeur est le plus grand.

Log in or create account · ⁨Se connecter ou créer un compte⁩

IGCSE, A-Level & AP