Command Palette

Search for a command to run...

Hectal
Phase 2: Control Flow
Python · Exercise 5 of 6 PreviousNext
Beginner

Print a numbered leaderboard

Given the lists names and scores, print one line per player in the form 1. Asha - 90, 2. Ben - 72, 3. Chen - 85. Numbers start at 1.

Each line is the number, a full stop, a space, the name, a space, a dash, a space and the score. Use enumerate and zip together, not range(len(...)).

What Check tests

  1. The first line is 1. Asha - 90
  2. All three lines are correct
  3. It works for other data (one player gives 1. Zed - 90)
  4. It uses enumerate and zip
  5. It does not use range(len(

Stuck? One hint at a time

The solution unlocks after your first Check. Try first: that is where the learning happens.

main.py
Sign in to run your code.

Output

Press Run to see what your program prints.