-
-
Save codecademydev/1115988c4258d631a501a87f7a49e423 to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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