Advertisement
Guest User

11 task

a guest
Apr 22nd, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. sum=0
  2. count=0
  3. while True:
  4.     x=int(input())
  5.     if x==0:
  6.         break
  7.     if x%8==0:
  8.         count=count+1
  9.         sum=sum+x
  10. if count>0:
  11.     sum=(sum/count)          
  12.     print(round(sum,1))
  13. else:
  14.     print('NO')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement