Learn Python 3 lesson help

I am new to coding, working my way thru the lessons in learn python 3.
I got to a project and Im not sure if I did it correctly. Could someone look at this code and compare it to the requirements here?

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], [“poerty”, 85], [“history”, 88]]

gradebook.append([“Computer Science”, 100])

gradebook.append([“visual arts”, 93])

gradebook[-1][-1] = 98

gradebook[2][1] = (“pass”)

full_gradebook = last_semester_gradebook + gradebook

Just want to see if there is anything wrong or if there is a better way. Thank you!

I think they wanted you to use.remove in a step for the sake of practice but otherwise it seems fine. The 2D list always gets questions but without loops or the just writing it out by hand is unfortunately what seems to be expected, see this dev response on a similar but not identical question (next project I think so try not to peek :stuck_out_tongue:)-

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.