My code below passes all tests with the exception of when 2 or 3 of the numbers are equal. In that case, my output is showing 2 or 3 of the same number, i.e. 7 three 3 times if x y and z are all equal to 7. Any ideas on how to stop that from happening? # Input 3 variables # Use conditional expressions to print the smallest integer # Code should work even if 2 or 3 of the numbers are equal
x = int(input("Insert integer"))
y = int(input("Insert integer"))
z = int(input("Insert integer"))
if x <= y and x <= z:
print(x)
if y <= x and y <= z:
print(y)
if z <= x and z <= y:
print(z)