MCPcopy Create free account
hub / github.com/geekcomputers/Python / get_computer_choice

Function get_computer_choice

rock_paper_scissors.py:19–22  ·  view source on GitHub ↗

Randomly select computer's choice.

()

Source from the content-addressed store, hash-verified

17
18
19def get_computer_choice():
20 """Randomly select computer's choice."""
21 options = ["rock", "paper", "scissors"]
22 return random.choice(options)
23
24
25def decide_winner(player, computer):

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected