22C:16 Computer Science I: Fundamentals.
Exam 2 Information


Exam 2 will be held on Friday, April 1st from 9:30 to 10:20 am (our regular class time). Students in discussion sections A1 and A2 should come to our regular classroom (W151 PBB) and students in the remaining sections (A3-A6) should go to room W10 PBB. This is an open notes exam that is 50 minutes long. It is worth 15% of your grade and will be marked out of 150 points. There will be four problems on the test and details of these problems are given below.
  1. Problem 1. [40 points] This problem will be on operations on strings and lists, operations that work exclusively on strings, and operations that modify lists in place. You can see all the operations that you will be asked about in this Python documentation page. Take a look at Section 5.6, until and including Subsection 5.6.1 and then Subsection 5.6.4. You will be given a bunch of Python expressions and asked to evaluate these. The problem will contains items similar to those in Problem 1 from Quiz 8 Practice and Problems 1 and 2 from Quiz 7 practice. To practice, you might also want to take a look at these Quiz 7 and Quiz 8 versions.

  2. Problems 2. [35 points] This problem will be on defining and calling functions, keyword arguments and keyword parameters, variable scope, and local and global variables. This problem will be similar to the problems in Quiz 6. To practice, you might want to take a look at all of these Quiz 6 versions.

  3. Problems 3. [35 points] In this problem, I'll guide you through the development of a programming solution to a problem by providing pseudocode and/or by describing what functions you should define, etc. There will be several parts to this problem, each will help you make some progress on the solution.

  4. Problem 6. [40 points] You will be asked to write a program from scratch. I will simply state the problem and expect you to write a small program that solves it. This will be similar in spirit to the programming problems you have seen in Homeworks 6, 7, and 8, with the focus largely on working with lists and strings.