22C:16 (CS:1210) Exam 2 Announcement
Exam 2 for 22C:16 (CS:1210) "Computer Science I: Fundamentals" will be held on April 5th (Friday) from 6:30 pm to 8:30 pm
in W10 PBAB.
This is the classroom where the morning section meets.
During the exam you can use any written or printed material you bring, including lecture notes, Python programs,
Python documentation, etc.
Make sure you bring everything that you feel you will need to the exam because you will not be allowed to share
or borrow material with classmates during the exam.
You will have to turn off and remove from your vicinity all electronic devices including
cell phones, lap tops, calculators, dictionaries, etc.
The exam is worth 130 points, which is 13% of your final grade. Here is a brief description
of the structure of the exam.
The first three problems are worth 30 points each and the last problem is worth 40 points.
Points will be equally divided between multiple parts of a problem.
Everything we have covered this semester, so far, is "fair game" for the exam.
However, the emphasis will be on material covered after Exam 1.
The following list should serve as a reminder of what we've covered after Exam 1.
- Problem 1. You will be given 10 expressions and asked to evaluate these and write down
their value and type.
- Problem 2. You will be given 2 programs and asked to write down the output produced
by each of these programs.
- Problem 3. You will be given 2 problems and for each you will be given a partially completed
program. You will have to "fill in the blanks" and complete each program in order to solve the given
- Problem 4. You will be given a problem and asked to write Python code to solve the problem.
The solution will involve 2-3 functions and you will be provided guidance on how to break up your solution into
- Arguments, parameters, keyword arguments and keyword parameters
- Variable scope, local and global variables in Python programs with functions, "mental" model of how
variable scoping is implemented in Python
- Basic File I/O
- Operations common to lists and strings including indexing and slicing
- Operations specific to lists that mutate lists in place (e.g., insert)
- Efficiency of list operations and mental model of how lists are implemented
- Generating lists using range, initializing lists using the * operator, iterating over lists
using the for-loop
- Functional programming in Python using map, filter, and reduce
- List comprehensions in Python
- Algorithms: selection sort and binary search
- Operations specific to strings (e.g., split)
- ASCII values of characters; the ord and chr functions.
To prepare for the exam solve the posted practice problems (solutions also posted), posted quizzes (solutions
also posted) and the following exams from earlier offerings of the course:
Exam 2 from Spring 2011
(solution available on the Spring 11 course page) and
Exam 2 from Spring 2012.
Exam 2 from Spring 2012 will be solved in the discussion sections this week (April 1-5).