Вроде так:
def average(*args):
kol = 0
sum = 0
for i in args:
sum += i
kol += 1
print(round(sum/kol, 2))
average(2, 3, 6)
average(2.3, 8, 25, 1.1)
average(2, 121)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Вроде так:
def average(*args):
kol = 0
sum = 0
for i in args:
sum += i
kol += 1
print(round(sum/kol, 2))
average(2, 3, 6)
average(2.3, 8, 25, 1.1)
average(2, 121)