Messing Up On AP Com Sci A Exams, Need Help

I keep messing up on the AP Com Sci Exams despite however long I study (for the quiz today, I studied for 9-10) hours, yet I am certain I got low 80’s. It is not even that the tests are difficult; it is just that a lot of the stuff, I don’t know how to think like a computer and understand how the code will print out.

Also, if this is any help, I think my teacher bases the AP CSA curriculum off of ‘A+ Computer Science’ (She uses worksheets and labs from there) and I think she uses the quizzes and tests from there as well. What can I do to truly understand programming, and ascertain/analyze what a code does?

Any help would be useful, and if you think there are any other resources that could help, please let me know. Thanks!

Lots of practice. Also most IDEs let you debug the code and analyze the control flow, what/when variables are set, etc. Do you have example questions?