Fermat was right!!!
In this assignment we had to create 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 right!ā Otherwise the program should print, āNo, that doesnāt work.ā This assignment was so we could get more knowledge about the chapter read and use that to make sure we had clear understanding of the topic.
Explanation:
While doing this assignment i encountered many problems. First I was not able to get any input value at all. We had to make sure that when run we got “Fermat was right!” in return. the input lets the user use any numbers and get the results. It was still difficult but I had help from a classmate. The ending results of the code are in the pictures.
By: Simran Sandhu