📝 Description
The Rock Paper Scissors game prints the object reference at the end of execution instead of displaying meaningful output. This happens because print(game) is called without defining a __str__() method inside the Rock_Paper_Scissor class.
Additionally, there are some code quality and logic issues:
random is imported inside the method instead of globally.
- The class name uses incorrect naming convention (
Rock_Paper_Scissor instead of Rock_Paper_Scissors).
rounds_played increments before a valid round is completed.
🔄 Steps to Reproduce
-
Go to rock_paper_scissors.py
-
Run the script using:
python rock_paper_scissors.py
-
Play the game and exit by entering no
-
Observe the output after the game ends
🎯 Expected Behavior
The program should end cleanly without printing the object memory reference. It should only display the final game statistics and save confirmation.
❌ Actual Behavior / Error Logs
The program prints an unwanted object reference like:
<__main__.Rock_Paper_Scissor object at 0x000001F3A2C7B550>
💻 Environment
- OS: Windows 11
- Python Version: 3.10.x
- File Name:
rock_paper_scissors.py
@steam-bell-92 I’m interested in working on this issue as part of GSSoC 2026. Please assign it to me if it’s available. Thank you!
📝 Description
The Rock Paper Scissors game prints the object reference at the end of execution instead of displaying meaningful output. This happens because
print(game)is called without defining a__str__()method inside theRock_Paper_Scissorclass.Additionally, there are some code quality and logic issues:
randomis imported inside the method instead of globally.Rock_Paper_Scissorinstead ofRock_Paper_Scissors).rounds_playedincrements before a valid round is completed.🔄 Steps to Reproduce
Go to
rock_paper_scissors.pyRun the script using:
Play the game and exit by entering
noObserve the output after the game ends
🎯 Expected Behavior
The program should end cleanly without printing the object memory reference. It should only display the final game statistics and save confirmation.
❌ Actual Behavior / Error Logs
The program prints an unwanted object reference like:
💻 Environment
rock_paper_scissors.py@steam-bell-92 I’m interested in working on this issue as part of GSSoC 2026. Please assign it to me if it’s available. Thank you!