Skip to content · ⁨Pular para o conteúdo⁩

Largest without max · ⁨Maior sem 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.

Português

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.

Log in or create account · ⁨Entrar ou criar conta⁩

IGCSE, A-Level & AP