Advertisement
DerioFT

1064.py

Sep 22nd, 2021
922
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. total = 0
  2. add = 0
  3.  
  4. for data in range(6):
  5.     number = float(input())
  6.  
  7.     if number > 0:
  8.         add += number
  9.         total += 1
  10.  
  11. avg = add/total
  12.  
  13. print(total,"valores positivos")
  14. print("%.1f" % avg)
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement