Count the positives · 양수 세기
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
Count the positives
Return how many numbers in a list are greater than 0. Zero itself does not count.
A counter starts at 0 and grows by 1 each time the condition is true.
한국어
양수 세기
리스트에서 0보다 큰 숫자가 몇 개인지 반환하십시오. 0 자체는 세지 않습니다.
카운터는 0에서 시작하며 조건이 참일 때마다 1만큼 증가합니다.
Write count_positive(nums) that returns how many numbers in the list are greater than 0. · 반환하는 count_positive(nums)을 작성하여 list 내 0보다 큰 수의 개수를 세어 반환하십시오.
Click Run to see the output here. · 출력을 보려면 '실행'을 클릭하세요.