Dec-17-2017, 12:39 PM
You are following the instructions fine, but you have logical errors in the program. I am trying to have you spot the errors yourself and learn from that.
Read the code as if the program was running, and (for now) foucs on newbalance variable. What is happening with it? Where/when does it get defined?
Another thing, the simulation will not end when stock gets below 0, because you don't exit the while loop at that point, it will just continue with next iteration until day hits 30.
Read the code as if the program was running, and (for now) foucs on newbalance variable. What is happening with it? Where/when does it get defined?
Another thing, the simulation will not end when stock gets below 0, because you don't exit the while loop at that point, it will just continue with next iteration until day hits 30.