def midel(*numbers):
h = 0
for n in numbers:
h += n/len(numbers)
return h
print(midel(4, 5, 6, 8))
def midel(numbers):
numbers = [int(number) for number in numbers]
return sum(numbers) / len(numbers)
numbers = input("Введите цифры через пробел: ")
numbers = numbers.split(" ")
result = midel(numbers)
print(f"Результат: {result}")
Введите цифры через пробел: 2 2 2 2
Результат: 2.0