Study Plan

I will take the quiz and note down tough questions to review later, then I will review and study those before the actual final exam.

Questions to Review

  • Question 17: At the lowest level, all digital data (including alphanumeric characters and machine language instructions) are represented with sequences of bits.
  • Question 28: Code segment I assigns the initial value of alpha to temp, then assigns the initial value of beta to alpha. The initial value of alpha, which has been stored in temp, is then assigned to beta. Therefore, the values of alpha and beta are interchanged. Code segment II assigns the initial value of alpha to temp, then assigns the initial value of alpha to beta. The initial value of alpha, which has been stored in temp, is then assigned to beta. Therefore, both variables are assigned the initial value of alpha.
  • Question 36: Code segment I assigns the initial value of alpha to temp, then assigns the initial value of beta to alpha. The initial value of alpha, which has been stored in temp, is then assigned to beta. Therefore, the values of alpha and beta are interchanged. Code segment II assigns the initial value of alpha to temp, then assigns the initial value of alpha to beta. The initial value of alpha, which has been stored in temp, is then assigned to beta. Therefore, both variables are assigned the initial value of alpha.
  • Question 47: A binary search will work on any sorted list, regardless of whether the list contains any duplicate values.
  • Question 50: Algorithm I accesses elements 2n times (twice for each of n elements), which is considered reasonable time. Algorithm II accesses n^2 elements (n times for each of n elements), which is considered reasonable time.
  • Question 57: Internet communications are not designed to be completely secure.
  • Question 59: Open-source software is typically free or low-cost.
  • Question 60: For example, assume that list1 contains [10, 10, 20, 30, 40, 50, 60] and list2 contains [20, 20, 40, 60, 80]. The first line of code creates bothList, which contains [10, 10, 20, 30, 40, 50, 60, 20, 20, 40, 60, 80]. The second line of code creates uniqueList, which contains [10, 20, 30, 40, 50, 60, 80]. The third line of code assigns to count the length of bothList (12) minus the length of bothList (7), producing the incorrect result 5.
  • Question 64: For these values, the procedure repeatedly adds -2 to result five times, resulting in the intended product -10.
  • Question 66: This line should not be removed. The variable count should increase by 1 when currentNum is a perfect number, so it should be incremented in the body of the IF statement.
  • Question 67: For this code segment, count is increased to 1 the first time “maple” is encountered in the list. However, count is reset to 0 when the code segment moves to the next list element. This causes the procedure to return 0 instead of the intended result 1.