I have a part of a bigger program here:
from random import randint
def computerChooses():
import random
choices = ["rock", "paper", "scissors"]
computerChoice = choices[randint(0,2)]
def whoWins():
if computerChoice == "rock":
print("DO THIS")
elif computerChoice == "paper":
print("DO THIS")
elif computerChoice == "scissors":
print("DO THIS")
computerChooses()
whoWins()
I always end up with:
NameError: name 'computerChoice' is not defined
(even though I believe it is!)
This, the error message states, is for line 20, and line 12.
What did I do wrong and where, specifically?
Thanks, Khy