Talk:Law of cosines - triples: Difference between revisions

Content added Content deleted
m (Changed 'function' to 'operator'.)
Line 22: Line 22:


::I'd see if you get a different answer for the extra credit if you use instead: int(round(c2**0.5)). --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 14:46, 24 September 2018 (UTC)
::I'd see if you get a different answer for the extra credit if you use instead: int(round(c2**0.5)). --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 14:46, 24 September 2018 (UTC)


::Thanks to user Hout for the extra Python solution. I ran it then extracted the generation of the list for the extended credit solution and then filtered out occurrences of the same triangle to get a still differing result:
::<lang python>
t60u = triangles(f60unequal, 10000)

len(t60u)
Out[4]: 18394

t60u[0]
Out[5]: '[3, 7, 8]'

t60new = set([tuple(sorted(tri)) for tri in t60u])

len(t60new)
Out[7]: 16161
</lang>
::I will try removing the **.5 tonight. Thanks.<br> [[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 09:15, 25 September 2018 (UTC)