Lab #5 Fruitful Functions

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 wrong!ā€ 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 user make input and therefore to produce result.

1