Question: In this exercise you write a code in Python which asks the user to input numbers, as many as the user likes, and then print

In this exercise you write a code in Python which asks the user to input numbers, as
many as the user likes, and then print the median of those numbers.
Please note that the median is the middle value in a list of numbers sorted in ascending order. If there's an even number of numbers, the median is the average of the two middle numbers.
You are not allowed to use any built-in functions, just normal calculations, loops, and if conditions.
You should submit your code and a short video (max 3 minutes) explaining the code. A sample video will be uploaded closer to the deadline.
The following is a sample production of the code (those in red are typed by the user):
Please input the number: 12
Do you have more numbers for input? True/False True Please input the number: 45
Do you have more numbers for input? True/False True Please input the number: 23
Do you have more numbers for input? True/False True Please input the number: 11
Do you have more numbers for input? True/False True Please input the number: 12
Do you have more numbers for input? True/False True Please input the number: 10
Do you have more numbers for input? True/False True Please input the number: 78
Do you have more numbers for input? True/False True Please input the number: -3
Do you have more numbers for input? True/False False The median of your numbers is: 12

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!