Session 17 Preparation — Videos, Reading and Quizzes

Sections 1, 2, and 5 (Professors Mutchler and Stouder),
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.) This sheet(s) may be typed or handwritten. You will gain the most benefit from it if you make it yourself instead of obtaining one from another source.

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.
  • Here is a SOLUTION; you are on your honor NOT to look at this solution until you have completed (or at least attempted) the problems themselves.

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 is simpler than the Juggler problem from Session14_Test2Practice, problem 1.
    • It will be more like a shorter version of the Point class that you did in Session 8.
    • Be especially prepared to implement methods that:
      • (__init__) stores its arguments in instance variables
      • reference and/or change their instance variables
      • call other methods
      • require introduction of additional instance variables
      • have arguments that are instances of the class and/or returns instances of the class.
  2. 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.
  3. 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
  4. 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
  5. 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 3 and 4 (Professors Galluzzi and Hays),
read THIS (right) side of this page

Wednesday in class, you will do a project that uses the Create robots. To prepare for Wednesday's session:

  • Read this documentation for the Create (robot) class. Warning: it is not 100% accurate.
  • Bring your questions about it to class.
  • In class, you will do an exercise that requires you to use many of the methods described in the above documentation.

This applies ONLY to 3 and 4 (Professors Galluzzi and Hays). Sections 1, 2 and 5 will do Test 2 on Wednesday, as described to the left.