This document outlines CS 21’s grading standards and describes how they map to course grades. The purpose of this grading scheme is to keep everyone focused on what matters in CS 21 — learning the course content (as opposed to worrying about grades, partial credit, etc.). One of the principles of this grading scheme is, whenever possible, to give students multiple opportunities to achieve a standard.

Course Grades

To earn any passing grade in CS 21:

  • You may not have more than two unexcused lab absences, as lab attendance is crucial for CS courses. Please refer to the course lab policies for more information about lab attendance.

  • You must consistently attend class and do so without causing disruptions (e.g., arriving late).

Assuming you satisfy the requirements for passing above, your final course grade will be determined by a combination of:

  • The number of course standards you achieve (detailed below).

  • Your average lab completion across all lab assignments (excluding lab 0). Each lab assignment will be evaluated for completion based on approximately 4-8 requirements that describe how your solution needs to behave. To earn credit for meeting a requirement, your lab solution must fully meet the requirement.

Table 1. CS 21 Grade Requirements for Standards and Labs
Grade Standards Achieved Average Lab Completion

A

18

90%

A-

17

85%

B+

17

80%

B

16

80%

B-

16

75%

C+

15

75%

C

15

70%

C-

14

70%

D+

13

65%

D

12

60%

D-

11

55%

Note that you must earn a C or higher in CS 21 to continue into CS 31 or CS 35. This prerequisite requirement applies whether you receive a letter grade or a CR/NC grade.

Standards

For each of the following standards, they may be evaluated on some combination of quizzes (Q), lab assignments (L), or the final exam (F). If a standard is evaluated on quizzes and the final, a student must demonstrate fluency in both of the places where it appears.

For some of the standards, students must demonstrate that they can achieve the standard more than once in the same context. Those standards are marked below with a number in brackets (e.g., [2]). This allows students to demonstrate consistency and stay on track for topics that build over the semester. For example, questions related to evaluating expressions (standard #3) will appear on multiple quizzes. As students progress though the semester, later quizzes will have more complex statements than earlier ones.

Clicking a standard below will list the criteria on which the standard will be evaluated. To achieve a standard, a student must demonstrate all of the applicable criteria. Note that not every criteria will be assessed on every quiz/lab and therefore students must only demonstrate the standards being evaluated at that time.

1. L[6] - Style
  • Use descriptive variable names

  • Appropriately include white space

  • Write code with readable line length

  • Write a comment that describes the program as a whole

  • Write a comment for each function that describes its parameters, return value, and purpose

  • Add comments to explain complex code segments

2. L[2] - Top-down design
  • Write a top-down design given a program specification

  • Implement a program from a top-down design

3. Q[4] - Evaluate python expressions to determine their values and types
  • Evaluate numeric expressions (+, -, , /, //, %, *, precedence)

  • Evaluate Boolean expressions (and, or, not, <, >, , >=, ==, !=)

  • Evaluate string expressions (+ concatenation, * repetition, [] indexing, len)

  • Evaluate list expressions (+ concatenation, [] indexing, len)

  • Evaluate object expressions (. notation, calling methods)

  • Convert between types

  • Assign variables and evaluate expressions with variables

4. Q[2] - Input / Output
  • Print using the print function

    • Output formatting using %

  • Reading user input with the input function

    • Saving the return value

    • Converting the return value to the correct type

5. Q[2] - For loops
  • Evaluate and trace for loops

  • Write a for loop to solve a problem

    • Iterate through a range with one parameter

    • Iterate through a range with multiple parameters, when needed

    • Iterate through an object (list, string, file, etc.)

6. Q[2] - The accumulator pattern
  • Evaluate and trace an accumulator pattern

  • Write an accumulator to solve a numeric problem

  • Write an accumulator to add items to a list

7. Q[2] - If statements
  • Evaluate and trace if statements

  • Evaluate and trace if statements with elif and else

  • Write if statements, with elif and/or else when needed

8. Q[2] - While loops
  • Evaluate and trace while loops

  • Write a while loop to solve a problem

    • Avoiding and interrupting infinite loops

    • Applying flag/sentinel variables for control flow, when needed

    • Using continue and/or break when needed

9. Q[2] - Lists
  • Iterate over the elements of a list

  • Index into a list and access its elements

  • Mutate a list using append

  • Mutate a list using indexing

  • Slice lists, when needed

10. Q, F - Writing and calling functions
  • Evaluate and trace the behavior of function calls

  • Write and call a function with no return value (for the side-effects)

  • Return a value from a function

  • Write and call a function that receives and uses parameters

  • Document functions with appropriate comments

11. Q[2] - Stack diagrams
  • Draw a stack diagram to model function call behavior

  • Draw a stack diagram to model function calls with mutable object parameters

12. Q[3] - Tracing full programs
  • Trace and determine the output of a full program

13. Q[2], F - Writing full programs
  • Write a full program to solve a problem

  • Define a main function

  • Define other functions, with parameters and return values, as appropriate for the problem

14. Q - Searching
  • Trace binary search algorithm (low, mid, high)

  • Adapt linear search algorithm to complex lab data

  • Adapt binary search algorithm to complex lab data

15. Q - Sorting
  • Trace a quadratic sort algorithm (bubble, selection, insertion)

  • Adapt quadratic sort algorithm(s) to complex lab data

  • Swap elements in-place (using a temporary variable)

16. Q - Analysis of algorithms
  • Given an algorithm or snippet of code, classify its runtime (linear, logarithmic, quadratic, etc.)

  • Compare the performance implications of different running times

17. Q, F - Recursion
  • Identify the base case of a recursive function

  • Identify the recursive case of a recursive function

  • Trace a recursive function

  • Write functions to solve a problem

  • Draw a stack diagram for a recursive function

18. F - Using objects
  • Call constructor(s) to create object(s)

  • Use dot notation to call object methods

  • Call getter and setter methods to retrieve / set object properties

19. F - Defining objects
  • Write a constructor

  • Write getter and setter methods

  • Write a str method to represent an object as a string (e.g., for printing)

  • Pass and access self in object methods

  • Define a class and use it to solve a problem

Topics measured by labs

The topics listed below are important for the course, but they are primarily evaluated on the lab assignments: these topics are not directly evaluated on quizzes or the final exam. These topics will be evaluated based on the requirements of each lab. Click on a topic to expand the list of sub-topics.

A. External libraries
  • Import a library in a program

  • Use a function from a library in a program

B. Mutable objects as function parameters
  • Mutate objects (lists, graphics, etc.) passed as parameters in the body of a function

C. Lists of lists
  • Trace functions that operate on a list of lists

  • Write a function that takes a list of lists and iterates over all items, potentially mutating some items

D. Files
  • Open a file

  • Read data from a file using a loop

  • Incorporate file data into a program