Largest without max · max 함수 없이 가장 큰 값 찾기
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · 이 페이지는 최신 브라우저(SharedArrayBuffer 지원)가 필요합니다. Chrome, Edge, Firefox 또는 Safari를 최신 버전으로 업데이트해 주세요.
This one builds on a lesson you haven't finished yet. Do that lesson first: · 이 과제는 아직 완료하지 않은 수업에 기반합니다. 먼저 해당 수업을 완료하세요:
Python Basics · Functions →
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.
한국어
max() 없이 가장 큰 값 찾기
Python의 max 함수를 사용하지 않고 리스트에서 가장 큰 숫자를 반환하십시오.
첫 번째 항목으로 시작하여 지금까지 찾은 가장 좋은 값을 유지하십시오. 리스트를 순회하면서 더 큰 값을 만나면 가장 좋은 값을 교체하십시오. 루프가 끝나면 가장 좋은 값이 가장 큰 값이 됩니다.
Write largest(nums) that returns the largest number in the list, without using max. · 반환하는 largest(nums)을 작성하여 list 내에서 가장 큰 수를 찾아내되, max은 사용하지 마십시오.
Click Run to see the output here. · 출력을 보려면 '실행'을 클릭하세요.