Answer to Question #257471 in Python for Els

Question #257471

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!


Input

A line containing four numbers (may contain decimal places) separated by a space.

2·-4·3.6·1

Output

A line containing an integer.

3
1
Expert's answer
2021-11-01T03:02:37-0400

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) 


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment