Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

how do i make a rock paper scissors program with python 3?

+8 votes
asked Dec 1, 2022 by Isabella (230 points)
i really need an answer before winter break

3 Answers

0 votes
answered Dec 3, 2022 by Peter Minarik (88,520 points)

See this question.

+2 votes
answered Dec 4, 2022 by TD - 06VA 806690 Tecumseh PS (230 points)
#make a while loop first#

#also make a randint 1-3#

from random import randint

random = randint(1, 3)

#the randint is for what the bot chooses (rock paper sizzors)

loop = True

while loop is True:

          print("Start of the game...")

if random == 1:

         #1 is rock

         player_choice = int(input("Type 1 for Rock, 2 for paper, 3 for sizzors... : "))

        if player_choice == 1:

                        print("You choose Rock!")

                        print("This round is a tie")

        elif player_choice == 2:

                       print("You choose Paper!")

                      print("You won this round")

        elif player_choice == 3:

                       print("You choose Sizzors!")

                       print("You lost this round")

elif random == 2:

         #2 is paper

         player_choice = input("Type 1 for Rock, 2 for paper, 3 for sizzors... : ")

         if player_choice == 1:

                        print("You choose Rock!")

                       print("You lost this round")

        elif player_choice == 2:

                       print("You choose Paper!")

                       print("This round is a tie")

        elif player_choice == 3:

                       print("You choose Sizzors!")

                      print("You won this round")

elif random == 3:

         #3 is sizzors

         player_choice = input("Type 1 for Rock, 2 for paper, 3 for sizzors... : ")

        if player_choice == 1:

                        print("You choose Rock!")

                      print("You won this round")

        elif player_choice == 2:

                       print("You choose Paper!")

                       print("You lost this round")

        elif player_choice == 3:

                       print("You choose Sizzors!")

                       print("This round is a tie")

#very simple rock paper sizzors!
+1 vote
answered Dec 12, 2022 by Behruz (420 points)

Game programming is a great way to learn how to program. You use many tools that you’ll see in the real world, plus you get to play a game to test your results! An ideal game to start your Python game programming journey is rock paper scissors.

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...