function computerplay() {
choices = ["rock", "paper", "scissors"]
var ai = choices[Math.floor(Math.random() * choices.length)]
return ai;
}
>>> import random
>>> random.choice(['red','green','blue'])
'green'