Q:

How to define a variable in Python

I am a first time learner of Python and i am trying to define the variable a in my function. 
How can i do it? 
Whenever i run this function, it says name 'a' is not defined.
and if there is anything more wrong, where did i get it wrong?
n= int(input ("choose your number >2     "))

def J(a,b):
    a = (n)
    b = (n-2)
    for (a) in range (n):
        for (b) in range (n-2):
            if a==b:
                print ()
def J(a,b):
    return math.factorial (a)// math.factorial (b)
size= J(a,b)
if size>40:
    a=input ("the pernutations would fill more than one screeen "
           +"still want to see th`enter code here`em all? yes or no    ")
    if a=="yes":
        print (J(a,b))
    if a=="no":`enter code here`
        print ()

A:

You need to define a and b or replace them with values. They act as placeholders for the values that are being inputted as your function caller. The a and b in the function are only local to the function, where when you call it, it sets the argument as the variable and treats it that way inside the function.
a = "value" #replace with your value, if not string, remove quotes
b = "value"  
size = J(a,b)

or
size = J(value1, value2)

