You need a naming convention... you used newBalance as a function name and a variable... that's a no-no
Anyways what j.crater was telling you before. The variable you define in your function are local variables. You can't grab the local variable and use in the main code or other function. You would need to create the variables again.
while days>0: days = days + 1that loop will never end. Because days will always be >0
updatedBalances = (newBalance + salesFigure - dailyexpenses) #this is to display the newbalnce on the users screenthere's no variable called newBalance or dailyexpenses from line 39 to 58. That why you have that error.
sold = salesFigure // priceOfProduct - shopPrice if (sold > shopPrice): lackOfStock = sold - stock costProfit = lackOfStock*priceOfProduct #this is a block of code for If statement showing working out for handling products sold and in stock sales = sales - costProfitbunch of missing variables.
Anyways what j.crater was telling you before. The variable you define in your function are local variables. You can't grab the local variable and use in the main code or other function. You would need to create the variables again.
When my code doesn't work I don't know why **think** and when my code works I don't know why **think**