Answer the question
In order to leave comments, you need to log in
How to correctly construct a selection by comparison in Python?
You need to make a program that takes three integers as input, and first displays the maximum, then the minimum, after which the remaining number.
With a minimum, a maximum figured out what to do with the rest?
a=int(input())
b=int(input())
c=int(input())
n=max([a, b, c])
m=min([a, b, c])
if a!=n and a!=m:
g=a
if b!=n and b!=m:
g=b
if c!=n and c!=m:
g=c
print(n)
print(m)
print(c)
Answer the question
In order to leave comments, you need to log in
print(c)- of course does not work, you need to replace it with print (g).
g = a + b + c - n - m
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question