Hello, can you please help me :)?

I have an array like this:

a=[1,-8,4,6]

there a positive and negative numbers in.

but now i only want to count the positive.

So now I have to make a function which returns the number of positive

numbers (in this time 3). I have tried, but I also managed to count all

numbers. but I need only to count the positive numbers. And I should do

it with a loop.

This is what I got so far:

def anzahl_positiv(a)

return a.count

end

puts “#{anzahl_positiv(a)}”