(Solution) Python Stuck on the Gradebook exercise this might help!

Hello everyone,

I wanted to share my solutions to the Pythons Gradebook exercise. I search through this forum for suggestions/solutions. But other users have found different methods that navigated outside of the lessons. So for part 8, where it asks you to delete the number 85, remember when adding both brackets [#]-Row [#]-Column, you will only need the row and the not the column, and the same applies to the “.append” command.

Example:
Fav_cars = [
[“Challenger”, “Hellcat”, 2020],
[“Mustang”, “Boss302”, 2022],
[“Camaro”, “Yenko”, 1972]
]

Let’s say I wanted to remove 2022. So it will look like this:

Column | 0 | | 1 | | 2 |
Row | 0 | Challenger Hellcat 2020
Row | 1 | Mustang Boss302 2022
Row | 2 | Camaro Yenko 1969

Fav_cars[1].remove(2022)

To append, then do the following:

Fav_cars[1].append(2012)

The updated list will look like so:
Column | 0 | | 1 | | 2 |
Row | 0 | Challenger Hellcat 2020
Row | 1 | Mustang Boss302 2012
Row | 2 | Camaro Yenko 1969

I hope this helps anyone stuck in their journey of learning Python!

Cheers

last_semester_gradebook = [["politics", 80], ["latin", 96], ["dance", 97], ["architecture", 65]] # Your code below: subjects = [ "physics", "calculus", "poetry", "history" ] grades = [ 98, 97, 85, 88 ] gradebook = [ ["physics", 98], ["calculus", 97], ["poetry", 85], ["history", 88] ] print(gradebook) gradebook.append(["computer science", 100]) gradebook.append(["visual arts", 93]) gradebook[-1][-1] = 88 print(gradebook) gradebook[2].remove(85) print(gradebook) gradebook[2].append("Pass") print(gradebook) full_gradebook = last_semester_gradebook + gradebook print(full_gradebook)