Python verifies Fermat's Great Theorem

topic description

Fermat"s Great Theorem (Fermat"s Last Theorem) states that no integer a, b, and c can make: a n + b n = cantilever, which is true for any n greater than 2.

write a function called check_fermat, which accepts four parameters-a br c and n-to check whether the < Fermat > theorem is true or not. If n is greater than 2 and the equation: a n + b n = cantilever holds, the program should output "Holy smokes, Fermat was Wrong!". Otherwise, the program should output "No,that doesn"t work.".

sources of topics and their own ideas

related codes

/ / Please paste the code text below (do not replace the code with pictures)

def check_fermat (a, b, c, n):

a = int()
b = int()
c = int()
n = int() or float() and n > 2
if (a**n + b**n == c**n):
    print("Holy smokes, Fermat was wrong!")
else:
    print("No, that does\"t work.")

check_fermat (int (), float ())
check_fermat (int (), int ())

what result do you expect? What is the error message actually seen?

I don"t know if this is correct. Xiaobai asks someone to give me some advice. thank you.

Feb.17,2022

a = int(a)
b = int(b)
c = int(c)

actually, I'd like to know how you verify it

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea974b-1f55.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea974b-1f55.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?