Checking Scalene Triangle ( I am learning from http://www.pyschools.com)
I do not know what I am wrong ,Because I could not pass this test.
Write a function isScalene(x, y, z) that accepts the 3 sides of a triangle as inputs. The function should return True if it is a scalene triangle. A scalene triangle has no equal sides.
Examples
>>> isScalene(2, 4, 3)
True
>>> isScalene(3, 3, 3)
False
>>> isScalene(0, 2, 3)
False
>>> isScalene(2, 2, 3)
False
My function define like this :
def isScalene(x, y, z):
if(x > 0 and y >0 and z> 0):
if(x!=y!=z):
return True
else:
return False
else:
return False
Could anyone give me a tip?
Try being more expressive, I suspect your x!=y!=z is the problem.