Answer to Question #283858 in Python for Nari

Question #283858

Hand game

1
Expert's answer
2021-12-31T08:59:03-0500
Abhinav_choice = str(input ("Abhinav choice:"))
Anjali_choice = str (input ("Anjali choice:"))
if ​Abhinav_choice == Anjali_choice:
   ​print ("Tie")
elif ​Abhinav_choice == "Rock":
   ​if Anjali_choice == "Paper":
       ​print ("Player 2 wins")
   ​else
        ​print ("Player 1 wins")
elif ​Abhinav_choice == "Paper":
   ​if Anjali_choice == "Rock":
        ​print ("Player 1 wins")
   ​else:
        ​print ("Player 2 wins")
elif ​Anjali_choice == "Rock":
    ​print ("Player 2 wins")
else:
    ​print ("Player 1 win")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS