Challenge Day 17- Continue Function

#help why is not working?


print("-- πŸ‘Šβœ‹βœŒ - Lets Play ROCK PAPER AND SCISSORS BABY - ✌ βœ‹πŸ‘Š --")
p1score = 0
p2score = 0
p1 = input("Player1 name? ")
p2 = input("Player2 name? ")
while True:
  
  r = ("R","ROCK","rock","Rock","r")
  s = ("S","s","Scissor","scissor","SCISSOR","s")
  p = ("P","p","Paper","paper","PAPER","p")
  print()
  print ("-Round 1-")
  print()
  print("!Select your moves!")
  p1move = input("Player 1 move>")
  p2move = input("Player 2 move>")

  if p1move in r and p2move in r :
    print(p2 ,"ROCKS AND ROCKS....Its a draw ")
  
  elif p1move in r and p2move in p :
    print(p2,"Wins by wrapping the rock inside it.πŸ₯³")
    p2score += 1

  elif p1move in r and p2move in s :
    print(p1,"Wins by breaking the scissors!! πŸ₯³")
    p1score += 1

  elif p1move in p and p2move in r :
    print(p1,"Wins by wrapping Rocks inside it πŸ₯³")
    p1score += 1
  
  elif p1move in p and p2move in p :
    print("Its a Draw πŸ₯Ί")
  
  elif p1move in p and p2move in s :
    print(p2,"Win πŸ₯³")
    p2score += 1
  
  elif p1move in s and p2move in r :
    print(p2,"Wins πŸ₯³")
    p2score += 1

  elif p1move in s and p2move in p :
    print(p1,"Wins πŸ₯³")
    p1score += 1
  else:
    if p1move in s and p2move in s :
      print("Its A draw again πŸ₯Ί ")
  if p1score == 3 or p2score == 3 :
    print (p1,"has",p1score,"and",p2,"has",p2score)
    
  else:
    continue

Can you post a repl link?

I fixed it… forgot to add break function at the end of the game. any ways thanks… if you still want to check it… here it is:
https://replit.com/@AazarRasheed/day17100-days#main.py

It is all one line, you should indent it. JK, use code formatting.

Anyways, could you mark your fix as the answer?

1 Like

in the future you might wanna add three backticks at the begging and end of any code to make it easier to read

print("This will apply syntax highlighting")

2 posts were merged into an existing topic: Day 017 - Project 17 : Rock Paper Scissors Multiple Rounds