Notice: Undefined offset: 6902316 in /var/www/html/qa-external/qa-external-users.php on line 744
python code keeps on giving paper - 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.

python code keeps on giving paper

+3 votes
asked Dec 4, 2022 by Zayd Ayub (190 points)
print("lets play rock paper scissors")
scissors = input()
paper = input()
rock = input()
if input() == rock:
    print("paper")
elif input() == paper:
    print("scissors")
elif input == scissors:
    print("rock")
else:
    print("invalid answer")

2 Answers

+1 vote
answered Dec 4, 2022 by (6,150 points)
print("lets play rock paper scissors")
player1 = input()

bot = input()

if player1 == "rock":
    print("paper")
elif player1 == "paper":
    print("scissors")
elif player1 == "scissors":
    print("rock")
else:
    print("invalid answer")

I guess that should do it =)
+1 vote
answered Dec 5, 2022 by RITESH RAJENDRA BARAHATE (160 points)

print("lets play rock paper scissors")
scissors = 1
paper = 2

rock=3
if input() == rock:
    print("paper")
elif input() == paper:
    print("scissors")
elif input == scissors:
    print("rock")
else:
    print("invalid answer")

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.
...