MCPcopy Create free account
hub / github.com/asweigart/PythonStdioGames / getRandomColor

Function getRandomColor

src/gamesbyexample/fishtank.py:96–99  ·  view source on GitHub ↗

Return a string of a random color.

()

Source from the content-addressed store, hash-verified

94
95
96def getRandomColor():
97 """Return a string of a random color."""
98 return random.choice(('black', 'red', 'green', 'yellow', 'blue',
99 'purple', 'cyan', 'white'))
100
101
102def generateFish():

Callers 1

generateFishFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected