Lab4: Fruitful Functions

In this lab, we had to check Fermat’s Theorem that says “no three positive integers a, b, and c can satisfy the equation a^n+b^n=c^n for any integer value of n greater than two”. First, we defined a function called “check_Fermat” with a series of statements and at the end we called the function in order to get a result. However, because we wanted the user to set a number, we establish the header of the function to let the user input his owns numbers.

Code: Fruitful Function (code)

Negative Answer: Fruitful Function (negative ans)

Affirmative Answer: Fruitful Function (possitive ans)