+ 1
About Python, why errors?
#Write a Python program to find the median among three given numbers. Click to see ⤵️ https://code.sololearn.com/cU878OLzTSb2/?ref=app
3 odpowiedzi
+ 6
It worked for me.
Make sure you enter all 3 numbers on their own line.
E.g.
10
12
14
OR
14
10
12
And so on...
+ 6
Mustakim Rahman ,
if your task always takes 3 input values, the calculation of the median can also be done like:
> take the input as 3 integer numbers: num1, num2, num3
> use sorted([num1, num2, num3])
> from the result of this operation take the index [1] which represents the median
+ 2
Convert input into int() type as
x = int( input() )