Largest without max · Más grande sin max
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.
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.
Write largest(nums) that returns · retornos the largest number in the list, without using max. · Escribe largest(nums) que devuelva el número más grande de la lista, sin usar max.
Click Run to see the output here. · Haz clic en Ejecutar para ver la salida aquí.