Python: setting max for bank withdraw
<p>I'm new to python and I am still trying to get the hang of it. I'm attempting to change the processing function in the following code so that the user can not withdraw more money then what the "bank" has on record, which is 500. I was hoping that someone could help. Would I enter an if statement for >500?</p>

<pre><code>#Simple Bank Atm
def main():
    PIN=7777;balance=500;pin=0;success=False
    Pin=getInput(pin)
    Pin,PIN,balance,success=processing(pin,PIN,balance,success)
    Display(success,balance)

#Input Function
def getInput(pin):
    pin=int(input(“Please enter your PIN:”))
    return pin

#Processing Function
def processing(pin,PIN,balance,success):
    if pin==PIN:
        success=True
        amt=float(input(“How much would you like to withdraw?”))
        balance=balance-amt
        return pin,PIN,balance,success
    else:
        success=false
        return pin,PIN,balance,success
</code></pre>