CS107 Final Exam Review

Chapter 5 (5.1, 5.2, 5.5, 5.6)

  • User input (nothing new)
  • eval function
  • Exceptions
  • try/except
  • Making Modules

Chapter 6 (6.1-6.2)

  • numpy
  • Arrays
  • Differences between arrays and lists
  • Creating arrays from lists
  • linspace function
  • zeros function
  • numpy math functions
  • matplotlib
  • Simple plots

Pandas

  • Reading csv files
  • Data Frames
  • Displaying data frames
  • Accessing series e.g. df["Mass"] or df.Mass
  • Accessing multiple series
  • loc for ranges: df.loc[20:40]
  • loc with conditions: df.loc[df.Mass > 1000]
  • iloc for indices: df.iloc[2, 5]
  • dtypes property
  • min, max, idxmin, idxmax functions

Test Format

The final exam is cumulative. It is intended as a two-hour exam, but you have three hours to complete it. Like test 2 this will be a Moodle quiz. However, this exam will be a combination of multiple choice, fill-in, and programming questions. Programming will be in one of two formats. Either you will attach the python file, or you write a few lines of python code. You will not be expected to use jupyter notebooks.

The scheduled exam time is Friday 12/16 from 1:30 pm to 4:30 pm. I will be available during this time. The exam will be posted by Monday 12/12. You may take the exam at any three hour time slot you would like from anywhere as long as you are done by the end of the exam period.

As with the previous tests, you may use any of your class resources including the text, your notes, my notes, old work, the Moodle site, and spyder. You may not search for answers online or discuss the exam with other students.


Data Set

The data set used for this exam comes from https://www.kaggle.com/datasets/psycon/periodic. You will use both a csv and a python versions of this data set. You should download them and make sure you can load them before starting the exam.

Python Data Set

CSV Data Set


Previous Review Lists

Test 1 Review
Test 2 Review
Clif Presser<cpresser@gettysburg.edu>
Last modified: Wed Dec 7 09:50:36 EST 2022