screen-shot-2016-10-30-at-10-55-17-pm screen-shot-2016-10-30-at-10-04-36-pm

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.”