Notice: Undefined offset: 6680113 in /var/www/html/qa-external/qa-external-users.php on line 744

Notice: Undefined offset: 6894074 in /var/www/html/qa-external/qa-external-users.php on line 744
how do i make a rock paper scissors program with python 3? - OnlineGDB Q&A
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?

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

3 Answers

+1 vote
answered Dec 3, 2022 by Peter Minarik (101,340 points)

See this question.

+4 votes
answered Dec 4, 2022 by TD - 06VA 806690 Tecumseh PS (280 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.

commented Dec 11, 2024 by Tyler Adams (350 points)
moved Dec 11, 2024 by Tyler Adams
same i do too hahahahahahaahahahaahahahahahahahahahahahaahahhahahaah
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...