Count the positives · Hitung yang positif
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.
Hitung bilangan positif
Kembalikan berapa banyak angka dalam daftar yang lebih besar dari 0. Nol itu sendiri tidak dihitung.
Pencacah dimulai dari 0 dan bertambah sebesar 1 setiap kali kondisi bernilai benar.
Write count_positive(nums) that returns how many numbers in the list are greater than 0. · Tulis count_positive(nums) yang mengembalikan berapa banyak angka dalam daftar yang lebih besar dari 0.
Click Run to see the output here. · Klik Jalankan untuk melihat output di sini.