Responsive Ad Area

Share This Post

test

Python LeaderBoard that displays the top 5 players

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()


Python LeaderBoard that displays the top 5 players
Python LeaderBoard that displays the top 5 players
test
{$excerpt:n}

Share This Post

Leave a Reply

Your email address will not be Publishedd. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Skip to toolbar