c:\Users\OmarHS\Desktop\AUB\CMPS\200\ASST3>python triangle_asst3.py 2.7 5.2 1.3 False Traceback (most recent call last): File "triangle_asst3.py", line 22, in <module> print(area(s1, s2, s3)) File "triangle_asst3.py", line 19, in area ar=math.sqrt(s*(s-s1)*(s-s2)*(s-s3)) ValueError: math domain error
(Sep-25-2017, 06:53 PM)buran Wrote: it works fine for me.
can you provide specific values for s1-s3 as well the full traceback you get?
Output:$ python3 triangle_test.py 10 15 20 True 72.61843774138907 Valid Triangle:72.61843774138907
Yes it does work for a valid triangle, but doesn't work for an invalid one in the last part of the code.