Arrays · 13 / 23 Exercise Medium

Search positive and negative numbers

Objective

Write a Python program that prompts the user to enter 10 real numbers and displays the arithmetic mean of positive and negative numbers.

Input
3
-5
2
4
-3
1
8
-10
6
4
Output
The average of negative numbers is -6.0
The average of positive numbers is 4.0

Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.

Start exercise