Quote (known954 @ Feb 10 2015 10:28am)
Ok... so if the list ranges from [0,3] than python will recognize [0,1,2] and [-1,0,-1] as the same thing?
also... the code you wrote doesnt work if you enter an invalid character
or if the else statement is needed? it won't output anything if you enter a non-triple like 3, 4, 6
It will recognize list[0], list[1], list[2] the same as it recognizes list[-3], list[-2], list[-1] and other combinations you can think of.
Seems fine for me, the problem you're having is the try statement isn't available in this short version I posted, if you want that you will have to implement it like done on the first page.

Code
[j0ltk0la@heretic] $ python -i test.py
Length of side 1: 3
Length of side 2: 4
Length of side 3: 5
Yes, these three values 9.00, 16.00, 25.00 can create a right triangle
>>> exit()
[j0ltk0la@heretic] $ python -i test.py
Length of side 1: 4
Length of side 2: 5
Length of side 3: 6
No, these three values 16.00, 25.00, 36.00 cannot create a right triangle
>>>
This post was edited by j0ltk0la on Feb 10 2015 10:32am