livepython.net

74. Python Program to Print the Top Three Scores

EasySlicing

Overview

Split a list into two parts with slices.

Problem Statement

Store these game scores, already ranked from best to worst, in a list called scores: 98, 91, 87, 76, 70, 64. Use slicing to print the top three scores, then all the other scores:

Top 3: [98, 91, 87]
Others: [76, 70, 64]

Input

No input is required for this question.

Output

Top 3: [98, 91, 87]
Others: [76, 70, 64]

Learn this firstChapter 9 · Python List Slicing: Get Part of a List
solution.py
# write your code here

EXPECTED OUTPUT

1Top 3: [98, 91, 87]
2Others: [76, 70, 64]

YOUR OUTPUT

Press Run to see your output here. Lines are compared with the expected output.