As shown in the picture, use the parameter as a variable factor in the function.
When you receive input.split so that you can receive multiple inputs. If you print it out, it comes out divided.
I don't know how to solve the problem next
def avg(num):
print(sum(num)/len(num))
def max(num):
print(max(num))
def min(num):
print(min(num))
input_num = input() # 3 45 38
nums = input_num.split(' ')
num = [int(n) for n in nums]
avg(num)
max(num)
min(num)
© 2024 OneMinuteCode. All rights reserved.