Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/geekcomputers/Python
/ first_player
Function
first_player
Tic-Tac-Toe Games/tic-tac-toe5.py:57–59 ·
view source on GitHub ↗
Randomly decide who goes first.
()
Source
from the content-addressed store, hash-verified
55
56
57
def
first_player() -> str:
58
""
"Randomly decide who goes first."
""
59
return
"Computer"
if
random.randint(0, 1) == 0
else
"Player"
60
61
62
def
play_again() -> bool:
Callers
1
main
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected