Advertisement
Guest User

Untitled

a guest
Dec 16th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. def avg(*args):
  2.    suma = 0
  3.    ile = 0
  4.    if args:
  5.       for arg in args:
  6.          suma+=arg
  7.          ile+=1
  8.       srednia = float(suma)/ile
  9.       print(srednia)
  10.    else:
  11.       print 0
  12.  
  13. avg(3,4,3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement