# Fruitful functions

Fermat’s Last Theorem states that no three positive integers a, b, and c can satisfy the equation anÂ +Â bnÂ =Â cn for any integer value of n greater than two.

For this lab, I had to create a function to see if Fermat’s Last Theorem was right or wrong. I use functions, integers, if and else statements to complete this lab. Doing this lab was fun because it is cool to do labs that makes the user make inputs. I follow the instruction giving below to complete this lab.

First problem.

1. 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.â€ť

2. 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.

Second problem.

In addition to the first problem, your code should let the user make input and therefore to produce a result.

Hint: use the built-in function <<raw_input>> and make the user input always be an integer.