An open API service indexing awesome lists of open source software.

https://github.com/sarahm44/python-gradebook

Uses Python lists to organise data related to a student's subjects and grades.
https://github.com/sarahm44/python-gradebook

codecademy codecademy-courses codecademy-cs codecademy-pro python-lists python3

Last synced: 10 months ago
JSON representation

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

Awesome Lists containing this project

README

          

# Codecademy Project: Python Gradebook

![""](https://i.pinimg.com/736x/8e/9e/39/8e9e3956e2929be4ccd0bf1c2be52ad3.jpg)

## 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](https://github.com/sarahm44/python-gradebook/blob/main/gradebook_notebook.py).

## Tasks
### Create Some Lists

1. Create a list called subjects and fill it with the classes you are taking:

* "physics"
* "calculus"
* "poetry"
* "history"

![""](https://github.com/sarahm44/python-gradebook/blob/main/Task_1.png)

2. Create a list called grades and fill it with your scores:

* 98
* 97
* 85
* 88

![""](https://github.com/sarahm44/python-gradebook/blob/main/Task_2.png)

3. 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.

![""](https://github.com/sarahm44/python-gradebook/blob/main/Task_3.png)

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

![""](https://github.com/sarahm44/python-gradebook/blob/main/Task_4.png)

See the output from the code as follows:

![""](https://github.com/sarahm44/python-gradebook/blob/main/Output_4.png)

### Add More Subjects

5. 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.

![""](https://github.com/sarahm44/python-gradebook/blob/main/Task_5.png)

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

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

![""](https://github.com/sarahm44/python-gradebook/blob/main/Task_6.png)

### Modify The Gradebook:

7. 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.

![""](https://github.com/sarahm44/python-gradebook/blob/main/Task_7.png)

8. 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.

![""](https://github.com/sarahm44/python-gradebook/blob/main/Task_8.png)

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

![""](https://github.com/sarahm44/python-gradebook/blob/main/Task_9.png)

### One Big Gradebook!

10. 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.

![""](https://github.com/sarahm44/python-gradebook/blob/main/Task_10.png)

Print full_gradebook to see our completed list.

![""](https://github.com/sarahm44/python-gradebook/blob/main/Output_10.png)