Guest User

Untitled

a guest
Jul 13th, 2023
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.41 KB | None | 0 0
  1. print("Let's play ROCK PAPER SCISSORS! ")
  2. p1score = 0
  3. p2score = 0
  4. p1 = input("Player 1 name: ")
  5. p2 = input("Player 2 name: ")
  6. counter = 1
  7. while True:
  8.   r=("R","ROCK", "rock", "Rock", "r")
  9.   s=("S", "s", "Scissor", "scissor", "SCISSOR")
  10.   p=("P", "p", "Paper", "paper", "PAPER")
  11.   print()
  12.   print()
  13.   print ("Select your moves!")
  14.   p1move = input("Player1 move>")
  15.   p2move = input("Player2 move>")
  16.   print("Round...", counter,+1)
  17.  
  18.   if p1move in r and p2move in r:
  19.     print(p1, p2,"Rocks and Rocks... it's a tie!")
  20.  
  21.   elif p1move in r and p2move in p:
  22.     print(p2, "Wins by wrapping the rock in the paper!" )
  23.     p2score += 1
  24.  
  25.   elif p1move in r and p2move in s:
  26.     print(p1,"Wins by breaking the scissors!! 🥳")
  27.     p1score += 1
  28.  
  29.   elif p1move in p and p2move in r :
  30.     print(p1,"Wins by wrapping Rocks with paper 🥳")
  31.     p1score += 1
  32.  
  33.   elif p1move in p and p2move in p :
  34.     print("Its a Draw 🥺")
  35.  
  36.   elif p1move in p and p2move in s :
  37.     print(p2,"Win 🥳")
  38.     p2score += 1
  39.  
  40.   elif p1move in s and p2move in r :
  41.     print(p2,"Wins 🥳")
  42.     p2score += 1
  43.  
  44.   elif p1move in s and p2move in p :
  45.     print(p1,"Wins 🥳")
  46.     p1score += 1
  47.   else:
  48.     if p1move in s and p2move in s :
  49.       print("Its a draw again 🥺 ")
  50.      
  51.   if p1score == 3 or p2score == 3 :
  52.     print (p1,"has",p1score,"and",p2,"has",p2score)
  53.      
  54.     break
  55.  
  56.   else:
  57.    
  58.     continue
Advertisement
Add Comment
Please, Sign In to add comment