Answer:
numbers = []
for i in range(9):
number = int(input("Enter an integer: "))
numbers.append(number)
print("The values are ")
for n in numbers:
print(n, end = " ")
print()
total = sum(numbers)
mean = total / len(numbers)
print("Mean is " + str(mean))
numbers.sort()
index = int(len(numbers)//2)
print("Median is " + str(numbers[index]))
Step-by-step explanation:
*The code is in Python.
Create an empty list to hold the numbers
Create a for loop to get 9 integers from the user
Print the numbers using another for loop
Find their total using sum() method
Calculate the mean, divide the total by the length of the list, 9
Sort the list using sort() method
Calculate the index of the median. Use this index to print the median