ı am using Chrimson Editor as a text editor and I think it suports only Active Perl as a compiler. I downloaded some new CPAN modules for emailing etc etc. I added them in Perl library but program still doesnt recognize those modules. Can you please help me? Is Active Perl doesnt support any extra modules? If so, what do you suggest me for Perl compiler?
Regards..

Read more here:: Is Active Perl Does Not Support any Extra CPAN Module?

      

import random

name = input("What is your name?")
print ("Welcome to Rock Paper Scissors", name, "!")

def computerThrow():
    throwOptions = ["rock","paper","scissors"]
    randomChoice = random.randint(0,2)
    return throwOptions [randomChoice]

def playerThrow():
  player = input("rock, paper, scissors?")
  return player

def compareThrows(player, computer):
  if player == computer:
    return("tie")
  elif player == "rock":
    if computer == "scissors":
      return("win")
    else:
      return("lose")
  elif player == "scissors":
    if computer == "paper":
      return("win")
    else:
      return("lose")
  elif player == "paper":
    if computer == "rock":
      return("win")
    else:
      return("lose")
  else:
      return("invalid")

def printMatchOutcome(result, player, computer):
  if result == "win":
    print(player, "beats", computer, " — You win!")
  if result == "lose":
    print (computer,"beats",player, "- You lose!")
  if result == "tie":
    print("tie match!")
  if result == "invalid":
    print ("invalid...try again")

def oneRound():
  player = playerThrow()
  print("You threw:",player)

  computer = computerThrow()
  print("Computer threw:",computer)

  compare = compareThrows(player, computer)
  printMatchOutcome(compare, player, computer)

#define counter variable
gamesPlayed = 0
playerWins = 0
computerWins = 0

userWantsToPlay = True
while userWantsToPlay:
    oneRound()
    response = input("Do you want to play again? (yes / no)")
    if response == 'yes':
      userWantsToPlay = True
    else:
      userWantsToPlay = False
print("Thanks for playing!")


def score(result):
  oneRound()
  if result == "win":
    return playerWins + 1
  elif result == "lose":
    return computerWins + 1

I am trying to add a score counter to my game so that once userWantsToPlay = False it will display the number of games played, and the score for the computer and the player. I have started it as a function but I am not sure if that is even right? How would I go about this?

Read more here:: How to add score counter to python rock paper scissors