CPSC 120 Principles of Computer Science Fall 2024

Exam 1 Review Information

Topics

Exam #1 will cover material from the first three weeks of the course — writing sketches, drawing, interaction, and animation. Functions and conditionals will not be on this exam.

In particular, you should expect to see the following topics:

Format and Types of Questions

The exam will be in class, written (not on the computer), and closed book though you may use a single page of notes (8.5x11", one side). This page may be handwritten or typed and can contain whatever you would like, but it must be personally prepared by you — you may not copy another student's notes or make copies of your own for others. Creating your own notes is an essential part of the learning process — deciding what to include requires engagement with the material which reinforces understanding and improves long-term retention of the material, provides an opportunity for review in order to identify gaps in your knowledge in time to ask questions before the exam, increases confidence in what you do know, and encourages taking ownership of your own learning.

You will only be asked about the things listed above. They are commonly used and have been used in class and/or lab, so you should already be pretty familiar with them.

Most questions will involve writing Processing code to achieve a particular result, similar to the in-class exercises. These will generally be short — you will not be asked to write large programs. You might also be asked to modify some provided code, describe what some code will do when run, or figure out sizes and coordinates for shapes in a scene.

Why a written exam in a programming course? Not being able to run your code tests whether you can think about the concepts correctly instead of relying on trial and error to create a particular result and whether you can read Processing code and understand what it does without running it. These are essential foundational skills for a programmer — it is very difficult to build a program of any size purely by trial and error, and reasoning through code is important for finding and fixing problems when it doesn't do what you want.

You are expected to have correct syntax in your answers, however, because you don't have the computer to point out problems, there is some leniency — small syntax errors such as the occasional missed semicolon will not be penalized. (However, frequent mistakes of the same type or large errors that indicate a lack of understanding will lose points as these types of problems are impediments to producing a successful program.)

How to Study

The best way to study for the exam is to practice as much as you can. The in-class exercises are a good for this — work on ones you didn't get to or didn't finish in class. Start by trying to do the problems yourself, then go to office hours and/or Teaching Fellows for help if needed. (Some solutions are posted. Don't look at them until after you've tried to solve the problem, and keep in mind that there can be more than one way to solve a problem — use the solutions as an example of a correct answer, not the only correct answer.)

Keep in mind that the key takeaway from this course should be the process of constructing programs — it's not about any particular end result, but rather knowing what to do to get there. Review the slides from class and in particular the flow charts and questions (e.g. the static vs active mode question and the animation questions) — these help you identify what to use to accomplish a task, and how to fill in the particular constructs.