Python 取款功能'<';在';非类型';和';int';

Python 取款功能'<';在';非类型';和';int';,python,python-3.x,Python,Python 3.x,我刚开始学习python。我遇到了以下错误 ”因为当余额

我刚开始学习python。我遇到了以下错误
”因为当
余额
时,您不返回任何内容,
当前余额
等于
无。您不能使用
,因为您没有在if语句中返回任何内容,
当前余额
结果为零。即使
余额
小于
金额
,您也需要返回
余额
,否则您会将
当前余额
设置为
,因为if语句不返回任何内容。然后,
金额
引发错误。
current_bal = 100

def withdrawl(balance, amount):
    if balance < amount:
        print('You have not enough money')
    else:
        balance -= amount
        print('You have withdrawn {}. Your new balance is {}'.format(amount, balance))
        return balance

current_bal = withdrawl(current_bal, 100)
current_bal = 100

def withdrawl(balance, amount):
    if balance < amount:
        print('You have not enough money')
    else:
        balance -= amount
        print('You have withdrawn {}. Your new balance is {}'.format(amount, balance))
    return balance

current_bal = withdrawl(current_bal, 100)```