Status: Tags: Links: AP Computer Science Study Progress
AP Computer Science A 2013 FRQ Practice
Code
|  |  | 
Review
- 43:44 total, 25/27 | 92.5% | 5
- 1 took 3, 12:40 | 2 took 7, 5 | 4 took 12:30, 3
- 9, 7, 9 respectively
- 2.a Should be Math.random() * 10 + 1- I can use normal for loops instead of while loops and would still be able to access different indexes
- Range of Math.random() * 10would be 0-9.999, and the int would truncate it to 0-9- Hence the + 1
- If only I hadn’t mainly used randInt previously smh
- -1
 
 
- If only I hadn’t mainly used randInt previously smh
 
- Hence the + 1
- Messed up calculation for currentPlayer too
- 1
 
 
- 2.b they used % instead of resetting value
- Used variable nextPlayerinstead ofi
 
- Used variable 
- 4.a
- They had an if statement to check my equivalent of isBackwardsand then had a for loop for it- Backwards for loop is for (int i = size-1; i>=0; i--)
 
- Backwards for loop is 
- Just used an index for scannedinstead of for since the row and col for loops restrict boundaries
 
- They had an if statement to check my equivalent of 
Thoughts
- Nice to understand Math.random() finally
- My solutions are unorthodox but they work sooo
- At least I’m knowledgeable enough of my tools to create abstract solutions
 
References: