Bank Teller project

Hi,
can someone please tell me why I am getting follwing error code:

TypeError: ‘int’ object is not iterable

My code:

checking_balance= [0] savings_balance= [0] def check_balance(account_type, checking_balance, savings_balance): if account_type == 'checking': balance = checking_balance elif account_type == 'savings': balance= savings_balance else: print('Unsuccessful, please enter checking or savings') balance_statement = print('Your', str(account_type), 'equals', str(balance)) return balance_statement def make_deposit(account_type, amount, checking_balance, savings_balance): deposit_status = '' if amount > 0: if account_type == 'savings': savings_balance += amount deposit_status = 'successful' elif account_type == 'checking': checking_balance += amount deposit_status = 'successful' else: deposit_status = 'Unsuccessful, please enter \checking\ or \savings' else: deposit_status = 'unsuccessful, please enter an amount greater than 0' deposit_statement = 'Deposit of', str(amount), 'to your', str(account_type), 'account was', str(deposit_status) print(deposit_statement) return savings_balance, checking_balance savings_balance, checking_balance = make_deposit('savings', 10, checking_balance, savings_balance)

Regards

At the start of your code, you’ve set up your checking and saving balance variables using brackets around the 0 (zero). This means python is using them as lists rather than integers.
So, when it gets to line 19 (and 22) : ‘savings_balance += amount’ - it’s getting confused because it’s trying to add an integer to the array and isn’t sure how to do that.
If you alter the declarations on lines 1 and 2 to leave out the brackets (i.e, savings_balance = 0 ), that should see you right.