Help on project

the computer is outputting two scores when it should be outputting one. Thanks

import random
c=0
pscore=0
cscore=0
score1=random.randint(1,6)
dice=[1,2,3,4,5,6]
while pscore<100 and cscore<100:
  choice=input("roll or hold: ")
  if choice=="roll":
    score=random.randint(1,6)
    if score!=1:
      print("You rolled a: "+str(score))
      pscore=pscore+score
      print("Your score is: "+str(pscore)) 
      print("Computer rolled a: "+str(score1))
      if score1==1:
        print("Computer rolled a 1, your turn")
        cscore=0
        print("Computer score is: "+str(pscore))
      else:
        cscore=cscore+score1
        print("Computer score is: "+str(cscore)) 
    elif score==1:
      print("You rolled a 1, no points and computer's turn")
      pscore=0
      print("Your score is: "+str(pscore))
      print("Computer rolled a: "+str(score1))
    if score1==1:
      print("Computer rolled a 1, your turn")
      cscore=0
      print("Computer score is: "+str(pscore))
    else:
      cscore=cscore+score1
      print("Computer score is: "+str(cscore)) 
  if choice=="hold":
    print("Computer's turn")
    print("Computer rolled a: "+str(score1))
    if score1==1:
      print("Computer rolled a 1, your turn")
      cscore=0
      print("Computer score is: "+str(pscore))
    else:
      cscore=cscore+score1
      print("Computer score is: "+str(cscore)) 
if pscore>=100:
  print("You Win!")
elif cscore>=100:
  print("Computer wins!")

Please delete the numerous blank lines.

The complexity of your program is very high for such a simple task. There are nine independent code paths through the while loop. This makes it difficult to keep track of all the different places where the scores can be printed.

To fix the problem, consider printing the scores only once, at the end of the loop.

Also, the computer player never re-rolls its die. That doesn’t seem correct.