Home Practicum 1 Practicum 2 Practicum 3 Practicum 4 Practicum 5 Practicum 6 Practicum 7 Practicum 8 Practicum 9

Welcome to DS2000 CS Practicum 6!

Introduction

Before we get to the actual exercise let's do a recap of for loops. Complete the quizes below, and we'll discuss the answers immediately in class. Please do one at a time (you have 5 minutes for each), wait for the discussion and only do the next one when everybody is ready!

  1. Quiz 1
  2. Quiz 2
  3. Quiz 3
  4. Quiz 4

Exercise 1 and only: Evaluating grades

Download the utils.py and the test.py. Do not modify the test.py, only run it to verify that your functions in utils.py work fine.

Scenario: Imagine a class of students, STUDENT_LIST. Each got grades for two exams, and the grades are held as lists GRADES_EX_1 and GRADES_EX_2, like this:

STUDENT_LIST = ['student_10', 'student_56', 'student_02', 'student_03',\
                'student_24', 'student_98', 'student_86', 'student_43',\
                'student_00', 'student_12', 'student_01', 'student_99']

GRADES_EX_1 = [91, 82, 41, 54, 67, 79, 49, 32, 95, 81, 77, 89]
GRADES_EX_2 = [55, 82, 47, 22, 67, 36, 99, 51, 53, 66, 90, 91]

All the lists are ordered in the same way, so that 'student_10' got 91 in exam 1 and 55 in exam 2, so their GPA is now 73. In this exercise we want to find out:

For each of these tasks there's a separate function in the utils.py, try completing them so that test.py executes successfuly! that's exactly how! for i in range(len(student_list[0])): gpa = 0 for grade_list in grade_lists: gpa += grade_list[i] gpa = gpa / len(grade_lists) gpa_list.append(gpa)