Python script to demonstrate Fermat's Last Theorem, with option to restart
Mathematics

Fermat's Last Theorem states:


  No three positive integers a, b, and c satisfy the equation an + bn = cn for any integer value of n greater than 2.


That's not what your code does.  Why are you requiring that a, b, and c be greater than 2, when they only need to be greater than 0?  Why does your prompt for n only say Give a positive number for the exponent "n" when it should say Give an integer greater than 2 for the exponent "n"?

And who is "Fermet"?

Flow control

Function calls should not be used as gotos.  Functions should accept parameters and return a result.  Your calls to user_input() and program_restart(), on the other hand, expect the execution to never return to the caller.  To see the problem with that, say "yes" a few times to retry the calculation, then hit CtrlC to abort.  You'll see the stack trace, which indicates that the ever-deepening stack is keeping track of all the calls, in anticipation for the opportunity to return control to the caller.  Since control never returns, the stack grows deeper and would eventually overflow.

Suggested solution

def prompt_yesno(prompt):
    return input(prompt) in 'Yy'

def prompt_int(prompt, min=None):
    while True:
        try:
            ans = int(input(prompt))
            if min is None or min &lt;= ans:
                return ans
        except ValueError:
            print("Input must be an integer.")

def is_fermat_counterexample(a, b, c, n):
    return n &gt; 2 and a**n + b**n == c**n

def fermat_demo():
    print("Let's see if Fermat was right.")
    print("He claims that a^n + b^n = c^n cannot be true for any n &gt; 2.")
    a = prompt_int('Give a positive integer for "a": ', 1)
    b = prompt_int('Give a positive integer for "b": ', 1)
    c = prompt_int('Give a positive integer for "c": ', 1)
    n = prompt_int('Give an integer bigger than 2 for exponent "n": ', 3)
    print("Holy smokes, Fermat was wrong!"
          if is_fermat_counterexample(a, b, c, n) else
          "No, that does not work!")

while True:
    fermat_demo()
    if not prompt_yesno("Would you like to try again?\n"
                        "Type 'Y' to continue and 'N' to exit: "):
        break


A more interesting demonstration

It would be a more satisfying demonstration if the computer asked the user for a, b, and n, then solved for c, showing that c is not an integer.