+ 3
A program that reads in three integer numbers the. Prints out the min value and the max value of the three numbers.
6 Respuestas
+ 5
x=[int(i) for i in input().strip().split()]
print("max is",max(x),"and min is",min(x))
this would read input as
3 5 7 3 4 1
in one line and this is not limited just for 3 inputs
output would be displayed as
max is 7 and min is 1
+ 2
Previous two answers are good, except you could use string formatting:
print("Minimum is {0}, and maximum is {1}.".format(0 = min(list1), 1 = max(list1)))
+ 1
a=input("Enter a value: ")
b=input("Enter a value: ")
c=input("Enter a value: ")
list1=[a, b, c]
print("The list of numbers is:", list1)
print("Lowest =", min(list1), "Highest =", max(list1)
Are you looking for something like that?
+ 1
print("enter the three numbers")
num1 = input()
num2 = input()
num3 = input()
minimum = min(num1, num2, num3)
maximum = max(num1, num2, num3)
print("maximum is " + maximum)
print("minimum is " + minimum)
0
print'enter the the three numbers you want to read'
l=[]
x=input ('enter first number:')
l.append (x)
y=input('enter second number:')
l append (y)
z=input('enter third number:')
l.append (z)
print'maximum of the three values you entered is',max (l)
print'minimum of the three values you entered
is',min (l)
0
Haha...itssofunny