Write a programExercise 1/4Basic10 XP

Positive and negative

Task

The input is one line of whole numbers separated by spaces. The program prints the sum of the positive numbers and the count of the negative ones (zero is neither positive nor negative):

Súčet kladných: 8
Počet záporných: 2

(for the input 3 -2 5 0 -7).

Examples

  • Input

    3 -2 5 0 -7

    Expected output

    Súčet kladných: 8
    Počet záporných: 2

After you submit, 4 hidden tests will also check your solution: only zero, all negative, one positive, more numbers.

Python starts the first time you run code.

Ctrl+Enter runs the program. Tab indents. Press Esc, then Tab, to leave the editor.

Input (stdin)

Each line = one call to input().

Output

Hints

Try it yourself first. Each hint reveals a little more - and lowers the reward a little.

Signed out, hints are free - but no XP is awarded either.

Solution

The solution unlocks after the last hint.