
Eva A. answered 02/22/23
Experienced Computer Science Teacher and Tutor
It looks like they want you to practice using the debugger. Do you know how to use the debugger with your IDE?
With a debugger, you can set a breakpoint that will pause the execution of your program so that you can see the values of variables at that moment. Then, you can step through the execution of your code, line by line, to double check values along the way.
Before using the debugger, consider what values the variables should hold at various points in your code and perform the math calculations on paper to better understand (and to verify) the formula. Then, you can use the debugger (or regular print statements) to verify that the values of variables and calculations in your program match your expected values.