Pratice problem on the functions

Write a Python function called calculate_average that takes three numbers as input and returns their average. Make sure to use appropriate parameter names and provide a sample function call.

def average(n1, n2, n3):
avg = (n1) + (n2) + (n3)/3
return (avg)

n1 = int(input("Enter a number: "))
n2 = int(input("Enter a number: "))
n3 = int(input("Enter a number: "))

1 Like