Python Forum
Code works but doesn't give the right results - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Code works but doesn't give the right results (/thread-40217.html)



Code works but doesn't give the right results - colin_dent - Jun-22-2023

Sorry, I didn't post the code right and problem was fixed in the meantime.

Thanks for all feedback.


RE: Code works but doesn't give the right results - mactron - Jun-22-2023

Please make this more readable and add code into the code block.

# your code



RE: Code works but doesn't give the right results - jefsummers - Jun-22-2023

Again please repost the code using the python code markers in the toolbar.
To get you started, In glicko2_rating_system() you have a for loop, for player in player_ratings. Add a print statement after that to see the contents of player. I think you will be surprised and see why the next line that follows fails to do what you think. If I'm wrong post your code in the format that will allow us to run it.