Question: python Introduction to Programming in Python: An Interdisciplinary Approach 1.3 Conditionals and Loops Median-of-5. Compose a program that takes five distinct integers from the command
python
Introduction to Programming in Python: An Interdisciplinary Approach
1.3 Conditionals and Loops
Median-of-5. Compose a program that takes five distinct integers from the command line and writes the median value (the value such that two of the other integers are smaller and two are larger). Extra credit: Solve the problem with a program that compares values fewer than seven times for any given input.
use if and for statment this is for loop python pleas
i have this code
but it does not run
numbers=[] bigger=0 smaller=0 for number in numbers: if numbers[0] > number: smaller = smaller + 1 if numbers[0] < number: bigger = bigger + 1
if smaller ==2 and bigger==2: print(numbers[0], " is the median")
can you pleas fix it
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
