Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created March 19, 2021 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/1115988c4258d631a501a87f7a49e423 to your computer and use it in GitHub Desktop.
Save codecademydev/1115988c4258d631a501a87f7a49e423 to your computer and use it in GitHub Desktop.
Codecademy export
last_semester_gradebook = [("politics", 80), ("latin", 96), ("dance", 97), ("architecture", 65)]
# Your code below:
# Create Some Lists
subjects = ["physics", "calculus", "poetry", "history"]
grades = [98, 97, 85, 88]
gradebook = [["Physics", 98], ["Calculus", 97], ["Poetry", 85], ["History", 88]]
# print(gradebook)
# Add More Subjects
gradebook.append(["Computer Science", 100])
gradebook.append(["Visual Arts", 93])
# print(gradebook)
# Modify The Gradebook
gradebook[-1][-1] = 98
# print(gradebook)
gradebook[2].remove(85)
# print(gradebook)
gradebook[2].append("Pass")
# print(gradebook)
# One Big Gradebook
full_gradebook = last_semester_gradebook + gradebook
print(full_gradebook)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment