For this lab I had to prove Fermats last theorem. I had to make a function called “check_fermat” that has 4 parameters “a,b,c,n”. That if n was greater than 2 and its true that a^n + b^n = c^n the program in the end should print, “Fermat was right!” or if its not true then it will print, “No, that doesn’t work.” Then I had to create a code where the user can write an input to produce a result with Fermats theorem.
Doing this lab was almost simple to do. Creating the function “check_fermat” was easy to do. It began to get a little challenging when I had to create the code for the user to make an input in the program. I was stuck where I had to add the built-in integer function, I wrote it first as “”a = int(input)(“Enter value for a:”)””. My error was closing the parenthesis where I wrote “input”. The correct way was “”a = int(input(“Enter value for a:”))””. The harder part for me was trying to get a print out of “Fermat was right!”. Every value I put in always gave me a “No that doesn’t work.”