Gradebook Worksheet

The Story So Far

Your technical expertise and gradebook wizardry has led the committee to make a surprising decision - in addition to teaching a full courseload, investigating wizardly mysteries, and helping oversee a quarter of the student body during non-class hours, you are now in charge of creating the new LMS gradebook. Like many schools with more confidence than sense, we're rolling our own.

Part 1

Today's part of the process is getting data in and out of a database, using Python.

In total, you will write:

  • A function which reads in a file formatted like students.csv and adds it to your student table.
    You can do this with the csv module, but read the docs of pandas.DataFrame.to_sql() for a faster method for converting large tables.
    (SQLite itself can actually directly read in csv as well, but it is not part of the Python interface.)
  • A function which writes a file (taking the target file as a parameter) formatted like students.csv. Row and column order do not matter, but make sure you have a header.
  • A function which reads in a gradebook in the format of the given class files, and inserts its (non-computed) values into your tables.
  • A function which reads out a gradebook in the format of the given class files, computing the grade as discussed previously (30%,30%,40%). Round to one decimal place.

Part 2

On Monday, we are going to talk about statistical functions in SQL, command line operation of Python, and extend our Python gradebook manipulator.

Department of Mathematics, Purdue University
150 N. University Street, West Lafayette, IN 47907-2067
Phone: (765) 494-1901 - FAX: (765) 494-0548
Contact the Webmaster for technical and content concerns about this webpage.
Copyright© 2018, Purdue University, all rights reserved.
West Lafayette, IN 47907 USA, 765-494-4600
An equal access/equal opportunity university
Accessibility issues? Contact the Web Editor (webeditor@math.purdue.edu).