Python 3 Gradebook Solution

I got stuck on the Python 3 gradebook project. I had to use the Python IDLE IDE to do this and break it down. Here is code. Does it look right? Yes I know I have extra print statements to try and make sure everything is working correctly.

#############################################################################

https://www.codecademy.com/courses/learn-python-3/projects/python-gradebook

#############################################################################

############

question 1

############

creating a list of courses taken:

subjects are physics, calculus, poetry, and history

subjects = [“physics”, “calculus”, “poetry”, “history”]
print(subjects)

############

question 2

############

creating a list of grades

98, 97, 85, 88

grades = [98, 97, 85, 88]
print(grades)

############

question 3

############

creating a 2D tavle

physics / 98

calculus / 97

poetry / 85

history / 88

############

question 4

############
gradebook = [[“physics”, 98],[“calculus”, 97],[“poetry”, 85],[“history”, 88]]
print(gradebook)

############

question 5

############

grade came back as 100

using the .append() to “add” to the list

with values of computer science and 100

using our 2D format

inner aka “computer science”

gradebook.append(“computer science”)
print(gradebook)

##########################################

stuck here

instructions provided do not work - why?

#########################################################################################################

example of what modified list should have

gradebook = [[“physics”, 98],[“calculus”, 97],[“poetry”, 85],[“history”, 88], [“computer science”, 100]

#########################################################################################################

outer aka score of 100

list.append(100) does not work

using gradebook.append(100) does work - why?

gradebook.append(100)
print(gradebook)

############

question 6

#########################################################################################################

example of what modified list should have

gradebook = [[“physics”, 98],[“calculus”, 97],[“poetry”, 85],[“history”, 88], [“computer science”, 100],

… continued fro previous line [“visual arts”, 93]]

… trying to edit the visual arts line of “93” to value of “98” aned the list.append fails

#########################################################################################################

grade for visual arts and 93 just came index

using append to add

note append only changes one(1) value

must append twice here … 1/subject and then 2/grade

gradebook.append(“visual arts”)
gradebook.append(93)
print(gradebook)

############

question 7

############

extra 5 points to change grade from a 93 to a 98

gradebook.remove(93)
gradebook.append(98)
print(gradebook)

############

question 8

############

removing the grade of 85 from the list

gradebook[2].remove(85)
print(gradebook)

############

question 9

############

adding the “pass or fail” value

gradebook[2].append(“Pass”)
print(gradebook)

#############

question 10

#############

creating a complete gradebook

full_gradebook = gradebook

do not have last_semester_gradebook = what are they talking about?

print(full_gradebook)

question 10

#############

creating a complete gradebook

full_gradebook = last_semester_gradebook + gradebook

print(full_gradebook)