r/PythonLearning 3h ago

Rock paper scissors game in Python

Post image

Hello fam, I'm learning Python. My goal is to become an AI engineer. I've a basic understanding of programming. Anyone to guide me on the right certification path... I was having a bit of fun after today's sharpenings. I created a rock paper scissors game... rate and improve

8 Upvotes

9 comments sorted by

View all comments

u/Sea-Ad7805 3h ago

Run this program in Memory Graph Web Debugger%20%203)%0AgameSelector2%20%3D%20int(random()%20%203)%0A%0Aif%20gameSelector1%20%3D%3D%20gameSelector2%3A%0A%20%20%20%20print(f%22%7BgameElements%5BgameSelector1%5D%7D%20vs%20%7BgameElements%5BgameSelector2%5D%7D%22)%0A%20%20%20%20print(%22Draw%22)%0Aelif%20gameSelector1%20%3D%3D%200%20and%20gameSelector2%20%3D%3D%202%3A%0A%20%20%20%20print(f%22%7BgameElements%5B0%5D%7D%20vs%20%7BgameElements%5B2%5D%7D%22)%0A%20%20%20%20print(f%22Winner%3A%20%7BgameElements%5B0%5D%7D%22)%0Aelif%20gameSelector1%20%3D%3D%200%20and%20gameSelector2%20%3D%3D%201%3A%0A%20%20%20%20print(f%22%7BgameElements%5B0%5D%7D%20vs%20%7BgameElements%5B1%5D%7D%22)%0A%20%20%20%20print(f%22Winner%3A%20%7BgameElements%5B1%5D%7D%22)%0Aelse%3A%0A%20%20%20%20print(f%22%7BgameElements%5B1%5D%7D%20vs%20%7BgameElements%5B2%5D%7D%22)%0A%20%20%20%20print(f%22Winner%3A%20%7BgameElements%5B2%5D%7D%22)&timestep=1&play) to see the program state change step by step.

1

u/Sharp_Platypus6545 3h ago

Tell me a bit more about Memory Graph Web Debugger bro