class Config: course_name = 'cs330' """ Exam data: a dictonary keyed by exam names. The values are also dictionaries. They can be three kinds: list, target or source (possibly both target and source). These kinds are implicit, are shown only in the comments. A target has a property 'sources', itself a dictionary Source properties: 'max': the maximum score, 'weight': if it is missing it is 1. 'cuts': whether the exam has letter grades. 'denom': denominator if different from the cut of the B grade. homework_data and program_datas will be merged into exam_data since homeworks are also exams. """ default_list = 'rst' programs_1_3_data = { 'p1': {'max': 10}, 'p2': {'max': 10}, 'p3': {'max': 10}, } homework_data = { '01': {'max': 30}, '02': {'max': 30}, '03': {'max': 25}, '04': {'max': 20}, '05': {'max': 30}, '06': {'max': 35}, '07': {'max': 30}, '08': {'max': 30}, '09': {'max': 40}, '10': {'max': 25} } # The weights do not have to sum to 100: for example here the extra credit p4 adds 3 more. course_sources = { 'homework': {'weight': 30}, 'midterm': {'weight': 25}, 'programs_1-3': {'weight': 10}, 'p4': {'weight': 10}, # Extra credit, since the denominator is computed from programs_1-3. 'final': {'weight': 35}, } exam_data = { # lists: 'rst': {}, 'homework': {'cuts': True, 'sources': homework_data}, 'midterm': {'cuts': True, 'max': 65}, 'programs_1-3': {'cuts': True, 'max': 30, 'sources': programs_1_3_data}, 'p4': {'cuts': False, 'cuts from': 'programs_1-3','max': 10}, 'final': {'cuts': True, 'max': 80}, 'course': {'list': 'rst', 'cuts': True, 'sources': course_sources}, } exam_data.update(homework_data) exam_data.update(programs_1_3_data)