Leaderboard

leaderboard-mario

Before completing this challenge you will need to make sure you have already completed a game or a quiz in Python with a scoring system.

You will then add a leaderboard functionality to your existing game or quiz in order to:

  • Store the player score at the end of the game,
  • Add an option for the player to view the leaderboard showing the ten highest scores sorted in descending order.

For this challenge you will create a leaderboard using a text file. The leaderboard.txt file will use the following format:

player_name;score;

You can download this example file:

TextFileleaderboard.txt

In order to complete this challenge you will need to read more about file handling techniques using Python, including how to append data at the end of a text file and how to read and extract data from a text file.

Share Button
Posted in Computer Science, Python - Intermediate, Python Challenges Tagged with: ,

Our Latest Book