Fermat’s Last Theorem


The first screenshot shows that I created a function named check_fermat with four parameters—a, b, c and n. I had to check to see if Fermat’s theorem works or not. If n is greater than 2 and it turns out to be true that an + bn = cn the program would’ve said, “Fermat was wrong!”. Since it did not, the program said, “No, that doesn’t work.”
blancaprob2In the second screenshot, I wrote a function in which I had to plug in values for a, b, c and n, converting them to integers, and used check_fermat to check whether they work with Fermat’s theorem or not.