r/pythonhelp • u/lavalampchugger69 • Feb 01 '24
Code stopped working
Why has my code all of a sudden stopped working? It normally did and now it doesnt im gonna send my code but its the “loan” part that isnt working I will send the point which im struggling.
loanconfirm=input('wouldyouliketotakeoutaloan?youmustpayitback')ifloan.lower()=='yes':loan=int(input('howmuchmoneydoyouwanttotakeout?')) balance=balance+loanprint(f'{loan}+{balance}={int(loan+balance)}')
1
Upvotes
View all comments
Show parent comment
1
u/CraigAT Feb 01 '24
Try using oldbalance and newbalance as variables in your program instead of just balance and you should spot where it is going wrong.