Fermat

fermat

The instructions were pretty straight forward. It’s all a matter of translation because coding is a language. My only struggle was the “if” and “else” because i tend to forget that they need to be on the same column.

fermat-result

Finally this is how the final result looked like. Asking the user to input the numbers and checking if Fermat’s formula works!

The first step of this assignment was the def a string named “check_fermet” that wields the letters (a, b ,c ,n). Fermet was a theorist who states that no three positive integers a, b, and c satisfy the equation  a^n + b^n = c ^n for any integer being n is greater than 2. So if n were to be greater than 2 then Fermet’s last theorem would be correct. Anything lower then too of course would be incorrect.  Finally i programmed the python to allow the user to enter an value for a b c and n to check if the numbers would work. 1 for n would not make the theorem true.