def main():
cash = float(input("How much money: "))
coins = 0
def changeCounter(n):
while True:
if cash - n > 0:
cash -= n
coins += 1
else:
break
return
main()
changeCounter(0.25)
When I run this code, I get the error
UnboundLocalError: local variable 'cash' referenced before assignment
How can I fix this?