Question #257417

The Positive Ones

by CodeChum Admin

There are different kinds of numbers, but among them all, the most commonly used numbers in our daily lives are those positive ones. So, I only want you to count all the positive numbers from the 4 outputted values and print out the result.


Go and search for the positive ones among these four!


Expert's answer

Num = 4 
count = 0 
for i in range(Num): 
    P = int(input("Enter a number: ")) 
    if P > 0: 
        count += 1 
print('Positive Numbers are:', count) 

LATEST TUTORIALS
APPROVED BY CLIENTS