Write a program to read n numbers from users and calculate the average of those n numbers in python

Code

n = int(input("Enter the number of numbers: "))
sum = 0
for i in range(n):
sum += int(input("Enter a number: "))
print("The average is", sum/n)

Output