Given a sorted list of integers, output the middle integer. Assume the number of integers is always odd. Ex: If the input is: XXXXXXXXXX the output is: 4 The maximum number of inputs for any test case...


Given a sorted list of integers, output the middle integer. Assume the number of integers is always odd.


Ex: If the input is:


2 3 4 8 11


the output is:


4


The maximum number of inputs for any test case should not exceed 9. If exceeded, output "Too many inputs".


Hint: First read the data into a list. Then, based on the list's size, find the middle item.



in python please. it gave me an error earlier : ValueError: invalid literal for int() with base 10: '2 3 4 8 11' and each set of inputs have a series of numbers to be inputted at once



Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here