Session 15 Preparation — Videos, Reading and Quizzes

Sections 3 and 4 (Professors Galluzzi and Hays),
read THIS (left) side of this page

Test 2 follows the same format as Test 1: paper-and-pencil problems followed by on-the-computer problems.

Paper and pencil problems:

The only external resource allowed is a single sheet of 8.5 x 11 paper, but for this test you may use BOTH sides of the sheet. (Or have 2 sheets, each using only one side.) Your instructor will tell you via email whether the pages must be handwritten or not.

For the paper and pencil questions, you should be prepared for problems like the following:

  1. A problem in which you implement a portion of a very simple class, from scratch.
  2. A box-and-pointer problem in which you make a box-and-pointer diagram for a snippet of code and indicate what the values of certain variables will be during the execution of the snippet.

See the Practice Problems for the paper-and-pencil portion of Test 2 for examples of each of the above. (Here is the same document as a PDF).

On-the-computer problems:

As for Test 1, you may use anything on your computer, including your projects, plus any written materials you bring to the test, plus anything directly reachable from the CSSE 120 course web site. You may NOT use any search engine (like Google).

For the on-the-computer problems, you should be prepared for problems like those in the following list. Note that you are unlikely to see ALL of these concepts on Test 2, but these are the ones that you should be prepared for. Also, you should be prepared to write TESTS for any of the following.

  1. A problem in which you implement a class that has NO sequences involved in any way. As such, this will be simpler than the Juggler problem from Session14_Test2Practice, problem 1.
  2. A problem that involves testing and updating an instance variable. See Session14_Test2Practice, Problem 1, draw_circles and Session08_ImplementingClasses, m1_Point, number_of_moves_made for problems that can help you prepare.
  3. A problem whose solution requires (unless you do fancy things) an INDEFINITE (while) loop. See Session14_Test2Practice, Problem 2, for a problem that helps you prepare for a test problem of this sort.
  4. A problem whose solution requires that you loop through a sequence (list, tuple or string) and do one or more of the following:
    • Print certain items in the list, or things related to those items.
    • Return how many items in the list have a certain property.
    • Return the sum of certain items in the list.
    • Draw (in RoseGraphics) various things based on the sequence (or sequences) passed as arguments to the function/method.

    See Session14_Test2Practice, Problem 3, for a problem that helps you prepare for a test problem of this sort. Additionally, Session 13 had relevant problems:

    • m1_pizza
    • m6_more_sequences: the sum_radii and count_last_n_odds problems
    • m7_bullseye
    Additionally, Session 12 had relevant problems:
    • m3_iterating: All 3 of its problems
    • m5_sequences_iterating_summing_counting: All 4 of its problems
  5. A problem whose solution requires that you loop through a sequence (list, tuple or string) and do one or more of the following.
    • FIND an item that has a certain property.
    • Find the LARGEST (or smallest) item in the sequence, or perhaps the item in the sequence whose BLAH is largest (or smallest), where BLAH could be any number of things.
    • Each time through the loop, examine the sequence at two different indices (e.g., at [k] and [k+1]).

    See Session14_Test2Practice, Problem 4, for problems that help you prepare for a test problem of this sort. In particular, Problem 4b lets you practice the FIND pattern, and Problems 4c and 4d let you practice the “two different indices” pattern. To practice the LARGEST (or smallest) pattern, do Problem 4a, but doing ONLY the part involving the even-numbered indices. (The rest of that problem is also good, but MUCH harder than you will see on Test 2, so make it low priority.)

    Additionally, Session 13 had relevant problems, especially in m6_more_sequences:

    • For the FIND pattern: contains_an_a, is_palindrome, and index_of_first_negative
    • For the LARGEST (or smallest) pattern: shortest_string and index_of_largest_number
    • For the “two different indices” pattern: number_of_stutters
  6. A problem that requires you to build up and return a sequence. See Session14_Test2Practice, Problems 2, 3 and 4c for problems that help you prepare for a test problem of this sort.

    Additionally, Session 13 had relevant problems: all of m4_accumulating_sequences.

Sections 1, 2, and 5
(Professors Mutchler and Stouder),
read THIS (right) side of this page

Wednesday in class, you will continue working on Session14_Test2Practice, especially the Juggler problem.

Test 2 is POSTPONED to the Wednesday AFTER Fall Break, October 14.

This applies ONLY to Sections 1, 2 and 5 (Mutchler and Stouder). Sections 3 and 4 will take the test on Wednesday, October 7, as scheduled.