Skip to content

Commit

Permalink
Update score to show only 2 decimal places
Browse files Browse the repository at this point in the history
  • Loading branch information
BobWritesCode committed Oct 8, 2022
1 parent efe15e7 commit e168267
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ def show_leaderboard_data():
print(f'{yellow("************************************")}')
print(f'{cyan("Top 10 highscores for classic mode")}')
print(f'{yellow("************************************")}\n')
print(f"{data[0][0]:<20}{data[0][1]:<20}")
print(f"{data[0][0]:<20}{ data[0][1]:<20}")

print('------------------------------------')

for key in data[1:10]:
print(f"{key[0]:<20}{key[1]:<20}")
print(f"{key[0]:<20}{'£ ' +'{:.2f}'.format(float(key[1])):<20}")

print_press_enter_to("Press Enter to return to main menu...")
main_menu()
Expand Down

0 comments on commit e168267

Please sign in to comment.