Program to get the median of given numbers.

In this python basic program, we will get the median of given numbers. 

Steps to solve the program
  1. Take a list as input.
  2. Sort the given list using sort().
  3. Use the formula (n+1)/2 to find the median of the given list, where n is the length of the list.
  4. Print the output.
				
					list1 = [45, 60, 61, 66, 70, 77, 80]
list1.sort()
a = (len(list1))/2 
print("Median: ",list1[int(a)])
				
			

Output :

				
					Median:  66
				
			

get the Average of given numbers.

print the square and cube of a given number.

Leave a Comment