# Fruitful functions or Fermat’s Last Theorem

In this lab you need to learn how to create a function called fruitful function, and how to define a language, finding definition on this language just like a translator also learn how to create a language in there or program it just like those programmer, will help you understand more of those language. So I think this lab was very helpful, maybe can help me learn more new language around the world too.Â  This is the step you need to follow when you need to create a Fruitful Function:

In number theory, 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. The cases nÂ =Â 1 and nÂ =Â 2 were known to have infinitely many solutions.

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.

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