--Originally published at Python learning
For this quiz I had to make a program that would print the smallest value and the sum of the square of three numbers given by the user (x,y, and z).
I decided to use conditionals to get the smallest value, like this:
if x <= y <= z or x <= z <=y:
return x
elif y <= x <=z or y <=z <=x:
return y
else:
return z
At first I didn’t put the equals in the equation, so there was trouble when two inputs were the same. However, I then added them to my code and everything was fine! When I was done this is how it looked:
And this is how it runned:
![](https://pixel.wp.com/b.gif?host=pythoncoursesite.wordpress.com&blog=122462166&%23038;post=193&%23038;subd=pythoncoursesite&%23038;ref=&%23038;feed=1)