Fermat’s Last Theorem

fruitful-functions-2

Write a function named check_fermat that takes four parameters—a, b, c and n and that checks to see if Fermat’s theorem holds. If n is greater than 2 and it turns out to be true that an + bn = cn the program should print, “Fermat was right!” Otherwise the program should print, “No, that doesn’t work.”

fruitful-functions-3

Write a function that prompts the user to input values for a, b, c and n, converts them to integers, and uses check_fermat to check whether they violate Fermat’s theorem.