Tips for approaching APCS MC

<p>I'm about to have a midterm for my APCS A class, and I feel like I'm having trouble with just approaching the MC - specifically, loops and recursion. Does anyone have any tips on how to trace through the code quickly and accurately? Lately I've been finding myself getting incorrect answers on almost every single MC I've practiced...</p>

<p>bump! anyone?</p>

<p>As always with CS, watch for patterns. For instance, given a loop where 0 <= i <= 9, and a particular function is called (e.g. printValue(i)) if i % 2 = 0, then you can obviously ignore all the odd numbers. Now if the question is asking what the second value of i to be printed, then, ignoring the odd numbers, you can simply count; 0, 2, and two is your answer. This example is simplistic, but you get the idea.</p>

<p>I took AP CS A years ago, but I recall its multiple choice being fairly unrelated to the ability to program, given that the language and style is somewhat arcane. However, the question I would pose to you is this: are you having trouble with the concepts in general (and applying them in your programs with minimal trial/error) or just the MC? If the former, I would recommend programming more. A fairly easy recursion problem is to list every file in a given directory and its subdirectories. In the latter scenario, I would likely just ask my teacher to give some practice MC problems occasionally. If it helps, the FRQs in APCSA are a breeze.</p>

<p>Thanks, vanimelde! I’m actually just having trouble with MC, and being able to trace through the code accurately. I’ve found the MC practice in Barron’s to be pretty helpful. Thanks for the tips!</p>