Guest User

Untitled

a guest
Jul 13th, 2023
119
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=0
  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.   counter+=1
  14.   print("Round:", counter)
  15.   print ("Select your moves!")
  16.   p1move = input("Player1 move>")
  17.   p2move = input("Player2 move>")
  18.  
  19.   if p1move in r and p2move in r:
  20.     print(p1, p2,"Rocks and Rocks... it's a tie!")
  21.  
  22.   elif p1move in r and p2move in p:
  23.     print(p2, "Wins by wrapping the rock in the paper!" )
  24.     p2score += 1
  25.  
  26.   elif p1move in r and p2move in s:
  27.     print(p1,"Wins by breaking the scissors!! 🥳")
  28.     p1score += 1
  29.  
  30.   elif p1move in p and p2move in r :
  31.     print(p1,"Wins by wrapping Rocks with paper 🥳")
  32.     p1score += 1
  33.  
  34.   elif p1move in p and p2move in p :
  35.     print("Its a Draw 🥺")
  36.  
  37.   elif p1move in p and p2move in s :
  38.     print(p2,"Win 🥳")
  39.     p2score += 1
  40.  
  41.   elif p1move in s and p2move in r :
  42.     print(p2,"Wins 🥳")
  43.     p2score += 1
  44.  
  45.   elif p1move in s and p2move in p :
  46.     print(p1,"Wins 🥳")
  47.     p1score += 1
  48.   else:
  49.     if p1move in s and p2move in s :
  50.       print("Its a draw again 🥺 ")
  51.      
  52.   if p1score == 3 or p2score == 3 :
  53.     print (p1,"has",p1score,"and",p2,"has",p2score)
  54.      
  55.     break
  56.  
  57.   else:
  58.    
  59.     continue
Advertisement
Add Comment
Please, Sign In to add comment