Largest without max · Maior sem 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.
Maior sem max
Retorne o maior número em uma lista sem usar o max do Python.
Mantenha o melhor valor encontrado até agora, começando com o primeiro item. Percorra a lista e substitua o melhor valor sempre que encontrar um maior. Quando o loop terminar, o melhor valor será o maior.
Write largest(nums) that returns · decrescentes the largest number in the list, without using max. · Escreva largest(nums) que retorne o maior número na lista, sem usar max.
Click Run to see the output here. · Clique em Executar para ver a saída aqui.