0 out of 464 challenges solved
Write a Python function `count_positive_numbers` that takes a list of integers as input and returns the count of positive numbers in the list. A positive number is any number greater than zero. #### Example Usage ```python [main.nopy] print(count_positive_numbers([1, -2, 3, -4])) # Output: 2 print(count_positive_numbers([3, 4, 5, -1])) # Output: 3 print(count_positive_numbers([1, 2, 3, 4])) # Output: 4 ```
def count_positive_numbers(numbers):
"""
Count the number of positive numbers in a list.
Args:
numbers (list): A list of integers.
Returns:
int: The count of positive numbers in the list.
"""
# Initialize a counter for positive numbers
positive_count = 0
# Iterate through the list and count positive numbers
# (Placeholder for implementation)
return positive_count