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.

unlock-access

Solution...

The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area

Did you like this challenge?

Click on a star to rate it!

Average rating 3.3 / 5. Vote count: 7

No votes so far! Be the first to rate this post.

As you found this challenge interesting...

Follow us on social media!

Tagged with: ,