LearnPy Hub
← Data Types & Casting problems
Hard

Counting Trues

Read four whole numbers. Print how many of them are positive, using the fact that True counts as 1 when added.

Input

Four integers.

Output

A count from 0 to 4.

Sample 1

Input
1
-2
3
0
Output
2

Sample 2

Input
5
5
5
5
Output
4
solution.py
Output appears here
Counting Trues · Python practice problem · LearnPy Hub