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:
You can download this example file:
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.
Solution...The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area