Answer:
The solution code is written in Python 3.
Explanation:
This program is written based on the presumption that the user will input an ordered set of numbers and therefore not sorting required.
We can use Python input() function to prompt user for number of measurement and assign it to n variable (Line 3).
We create a list to hold the values of measurement (Line 4).
Next, create a for-loop by passing the n as the second argument in the range() function. This will enable the for-loop to run through n-number of times and prompts user for an input measurement per time (Line 6-7). Each input measurement is appended into the measurement list (Line 8).
Prior to calculating the median, we need to check if the number of measurement, n, is odd or even. This can be done using the modulus operator, %.
At last, we use print() function to print the median (Line 13 & 17).