This is not a homework question, I can assure you.
I'm trying to write a function that tests whether the equality a**n + b**n = c**n
holds for
n∈{2,3,…,10}.
And if there is a value of n for which the equality holds, the function should return the lowest such value as an int
. The function should return False
if the equality does not hold for any value of n in the given range.
e.g.
print(f(3,4,5))
outputs:
2
and
print(f(1,2,3))
outputs:
False
I'd love to see the different approaches to such a question. I promise you this is not a homework question. Thanks in advance :)