Explore what CodeHS has to offer for districts, schools, and teachers.
Click on one of our programs below to get started coding in the sandbox!
View All
Given the following list, what statement will print the last two names and their high scores to the console?
hi_scores = ["Sam", 1500, "Greg", 1460, "Vanessa", 1250, "Elenor", 1130]
print(hi_scores[4:])
print(hi_scores[2:])
print(hi_scores[:4])
print(hi_scores[:2])