I wrote the following code:
def addInterest(balance, rate):
newBalance = balance * (1+rate)
return newBalance
def test():
amount=1000
rate=0.05
addInterest(amount, rate)
print("" ,amount)
test()
I expected the output to be 1050, but it is still printing 1000. Can someone tell me what am I doing wrong?