Try to search your question here, if you can't find : Ask Any Question Now ?

Python LeaderBoard that displays the top 5 players

HomeCategory: stackoverflowPython LeaderBoard that displays the top 5 players
Avatarkundan asked 4 months ago

im trying to make a leaderboard for a card game that, when the game is over, displays the winning players name and the amount of cards they had.

So far, my code only displays 1 winning players stuff and not 5. This then gets overwritten once the next game has ended. any help?

Ill paste my current code below.

myFile = open("Leaderboard.txt","w")
myFile.write("{0} Won Their Game With {1} Cards!".format(Player1Name, 
PlayerOneScore))
myFile.write("n")
myFile.write("{0}  Won Their Game With {1} Cards!".format(Player2Name, 
PlayerTwoScore))
myFile.write("n")
myFile.close()
1 Answers
Best Answer
AvatarMikhail answered 4 months ago
Your Answer

10 + 2 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com