Skip to content

sarahm44/python-gradebook

Repository files navigation

Codecademy Project: Python Gradebook

""

Overview

For the purpose of this activity, I am a student and trying to organise my subjects and grades using Python.

The notebook containing the code is here.

Tasks

Create Some Lists

  1. Create a list called subjects and fill it with the classes you are taking:
  • "physics"
  • "calculus"
  • "poetry"
  • "history"

""

  1. Create a list called grades and fill it with your scores:
  • 98
  • 97
  • 85
  • 88

""

  1. Manually (without any methods) create a two-dimensional list to combine subjects and grades. Use the table below as a reference to associated values.
Name Test Score
"physics" 98
"calculus" 97
"poetry" 85
"history" 88

Assign the value into a variable called gradebook.

""

  1. Print gradebook. Does it look how you expected it would?

""

See the output from the code as follows:

""

Add More Subjects

  1. Your grade for your computer science class just came in! You got a perfect score, 100!

Use the .append() method to add a list with the values of "computer science" and an associated grade value of 100 to our two-dimensional list of gradebook.

""

  1. Your grade for "visual arts" just came in! You got a 93!

Use append to add ["visual arts", 93] to gradebook.

""

Modify The Gradebook:

  1. Our instructor just told us they made a mistake grading and are rewarding an extra 5 points for our visual arts class.

Access the index of the grade for your visual arts class and modify it to be 5 points greater.

""

  1. You decided to switch from a numerical grade value to a Pass/Fail option for your poetry class.

Find the grade value in your gradebook for your poetry class and use the .remove() method to delete it.

""

  1. Use the .append() method to then add a new "Pass" value to the sublist where your poetry class is located.

""

One Big Gradebook!

  1. You also have your grades from last semester, stored in last_semester_gradebook.

Create a new variable full_gradebook that combines both last_semester_gradebook and gradebook using + to have one complete grade book.

""

Print full_gradebook to see our completed list.

""

About

Uses Python lists to organise data related to a student's subjects and grades.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages