CS 149: Programming Fundamentals 
James Madison University, Spring 2022 Semester 

Exam #2 logistics and preparation

As a reminder, the midterm will consist of two parts (50 minutes each): a written exam on Tues, and a coding exam on Thursday. You are encouraged to study all previous activities and labs, textbook chapters and reading quizzes, and programming assignments. Solutions will NOT be posted for these practices.  This reference sheet will be provided for the coding exam only.

  1. image Sample Written Exam
  2. image Primary Practice Coding Exam 
  3. image Secondary Coding Exam

Written Exam


Students will be able to...

  • Recognize vocabulary/concepts from Ch 5-9.
  • Evaluate relational and conditional expressions.
  • Trace by hand the values of variables in a loop.
  • Declare, instantiate, and assign lists of values.
  • Write functions that require loops and decisions.
  • Use, manipulate and return string values.


  • This is a closed-book, closed-notes, no-calculator exam. Do not refer to any materials other than the exam itself.

  • Do not look at anyone else's exam. Do not talk to anyone but the instructor during the exam. Turn off all cell phones, etc.

  • Use the restroom and take care of personal needs before you arrive. If you need to leave during the exam, ask for permission.

Coding Exam


Students will be able to...

  • Meet any objectives from HW 5-8.
  • Compute stats over a list  of tuples.
  • Use dictionaries
  • Write nested/chained if-else statements.
  • Use lists and loops (for and while)


  • You must use a Linux lab machine and log in with  student. It's strongly recommended that you practice the sample exam in the lab so there will be no surprises on exam day.

  • During the exam, you may only access Gradescope and the provided reference sheet.

  • You may only run the following programs: Thonny (or other editor), a terminal, and a web browser. All windows should be arranged so that the instructor can see what you're doing.

  • The use of any pre-existing code (other than that provided as part of the exam), other documents/pages/sites, and/or other programs will be considered a violation of the Honor Code.

  • At the end of the exam, you will submit your code via https://gradescope.com . You may not use Gradescope for any other purpose (e.g., looking at code from prior assignments) during the exam.

Back to Top