Advertisement
Jorell_Ramos_Sinaga

Untitled

Dec 18th, 2021
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. count=0
  2. sum=0.0
  3. for i in range(1,7):
  4. n = float(input())
  5. if(n>0):
  6. sum = sum + n
  7. count=count+1
  8. average = sum/count
  9. print(count, "valores positivos")
  10. print("{:.1f}".format(average))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement