Skip to content · ⁨Saltar al contenido⁩

Largest without max · ⁨Más grande sin 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.

Español

Más grande sin usar max

Devuelve el número más grande de una lista sin utilizar max de Python.

Mantén el mejor valor encontrado hasta el momento, comenzando con el primer elemento. Recorre la lista y reemplaza el mejor valor cada vez que encuentres uno mayor. Cuando termine el bucle, el mejor valor será el más grande.

Log in or create account · ⁨Iniciar sesión o crear cuenta⁩

IGCSE, A-Level & AP