Score: 34/39

Questions

Question 9

  • I got this problem wrong because I did not know that you had to add (int)(Math.random()*6) to the 2 times argument to role the two dice. The six would total to the six sides of the dice.

Question 13

  • I got this problem wrong because i thought that the loop would go through and update three elements instead of five elements since k starts at 1.

Question 20

  • The answer that I choose would only be correct if the max value in the "nums" was also the value that occured the most times. Instead, the loop starts at 0 and interated through arr.

Question 22

  • I got this one wrong because I didn't correctly follow the path of the for loop to rpoduce the output of 123456. Option A would be the correct answer because it iterates through row by row which outputs 123456

Question 30

  • I got this problem wrong because I thought that choice II would copute the correct price for "numBoxes". However, II only is right because it will check if the first conditions are met and them go to the nested else.

Summary

  • Doing this with a group helped a lot because I had multiple people to ask questions to and bounce answer choice ideas off each other. I felt that a lot of the questions I got wrong were ones where you had to go through and look at the loops carefully because I often made silly mistakes.