2010 AP Computer Science Discussion

<p>On FRQs, if you don’t know how to do a part of something, can you just put random stuff and assume it’s right so you can continue? And since it always requires that you return something, can you just put “return (w/e)” for the 1/2 - 1 point, even if you have no/little other code?</p>

<p>Anyone have list of what the possible FRQ topics are, in general? So many of them require you to initialize a variable, loop through an array and update variable, and return new variable. Is it ever safe to just write out some code like I just described and hope for some points even if you hardly know what the question’s about? Graders might just give points for initializing a variable, looping, returning, etc.</p>

<p>Do you get the appendixes of this on the exam?: <a href=“College Board - SAT, AP, College Search and Admission Tools”>College Board - SAT, AP, College Search and Admission Tools;

<p>If you absolutely don’t know how to do a problem, I would put stuff that seems right and then have it return something of the correct type (Ideally what ought to be returned, but if you’re not sure it probably is better to have something than not to finish your code).</p>

<p>I wouldn’t just write random stuff, but if you’re not sure exactly how to get it do one thing in particular, you should definitely finish off the method (and hopefully leave room if it comes back to you).</p>

<p>No you get this one: <a href=“Supporting Students from Day One to Exam Day – AP Central | College Board”>Supporting Students from Day One to Exam Day – AP Central | College Board;

<p>Oh how bout: can you just put something like “//supposed to choose a random int from 1-4” if you don’t know how to do that in code? Or would it be better to just put something that might be correct and hope that grader knows what you mean? Assuming you just want to continue and finish the class/method/w.e.</p>

<p>Anyone got FRQ predictions? Do you ever have to catch exceptions of FRQs?</p>

<p>No, like someone said they aren’t supposed to look at code.</p>

<p>you won’t get any partial credit for that, although it couldn’t hurt to add that, but you need to try to write it.</p>

<p>int x = (int)(Math.random()*4) + 1;</p>

<p>should create a random int between 1-4.</p>

<p>Remember that it is (int)(Math.random()*(high-low)+1)+low</p>

<p>to create a random int between high and low inclusive.</p>

<p>If you put</p>

<p>int x = (int)(Math.random()*3)+1;</p>

<p>and you are not sure you got it write, it wouldn’t hurt to comment that. (That is what I would do in that situation).</p>

<p>They are definitely not going to have us catch exceptions, as that is something that is more tuned to actual programming rather than concepts.</p>

<p>^
For random ints, can you just do the following? I like the method below better since I was taught it that way.</p>

<p>Random r1 = new Random();
int RandomIntBetween1and4 = r1.nextInt(4)+1;</p>

<p>I’m pretty sure you always get 1/2 point for attempting to write something. So always attempt.</p>

<p>Hold on, if sidelength is x, the sidelength is x as well. the only thing that is x+1 is the flowers that are put on each side…</p>

<p>There are no catch exceptions on frqs. and it’s all in pencil.</p>

<p>It is all in pencil? Oh well I’m still bringing pens because all of my other APs have FRQs in pen.</p>

<p>Yes you are right about the flowers. I was saying that what I would have called sideLength is the number of flowers on each side of the box.</p>

<p>are 2d arrays tested on the A exam?</p>

<p>They aren’t really any more difficult than 1-d arrays, but I don’t know if they’re tested</p>

<p>arr[1][2] = the 3rd item in the array that is in the 2nd position of the array.</p>

<p>Yes, they are tested.</p>

<p>Eh the only thing I really see different with 2-d arrays is looping through them…</p>

<p>Well you just do a nested loop, and for the inner loop use </p>

<p>for(int j; j < arr[j].length; j++)</p>

<p>A rubric showing what general syntax errors can be penalized on the FRQ is on the last page of this PDF: <a href=“Supporting Students from Day One to Exam Day – AP Central | College Board”>Supporting Students from Day One to Exam Day – AP Central | College Board;

<p>I don’t know if it’s still relevant, because it’s from the 2004 FRQ, but it should be helpful.</p>

<p>Yeah the nest. Also, this has been bugging me for a while, in a while loop, if there is an if statement in the while loop with a return statement in the if loop, will the while loop terminate? For example:</p>

<p>public static boolean isSelfDivisor(int number)
{
int n = number;
while (n > 0)
{
int d = n % 10;
if (d == 0 || number % d != 0)
return false;
n /= 10;
}
return true;
} 1</p>

<p>When false is returned, will the while loop (and also the method) be terminated, because it can only return one thing? (p.s. this is the 2007 frq #1.</p>

<p>Yeah, the whole method is terminated.</p>

<p>Thanks man, everything makes so much more sense now.</p>

<p>Relevant: Doesn’t specify for Comp Sci, but their general answer is pen is recommended not required, as shown. Source is sorta meh…</p>

<p>[AP</a> Tests - The Well-Trained Mind Forums (aka Hive Mind)](<a href=“http://welltrainedmind.com/forums/showthread.php?t=143544]AP”>http://welltrainedmind.com/forums/showthread.php?t=143544)</p>

<p>

</p>

<p>Don’t make mistakes? It actually sounds really annoying to code in pen, not even in pencil.</p>

<p>I intend to use scrap paper to work out the parts of the code that aren’t completely obvious, so as to avoid error. That is assuming they give us scrap paper.</p>

<p>I’m paying $87 dollars for the test. I better get some f****** scrap paper.</p>