MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / seed

Function seed

cellular_automata/game_of_life.py:49–52  ·  view source on GitHub ↗
(canvas: list[list[bool]])

Source from the content-addressed store, hash-verified

47
48
49def seed(canvas: list[list[bool]]) -> None:
50 for i, row in enumerate(canvas):
51 for j, _ in enumerate(row):
52 canvas[i][j] = bool(random.getrandbits(1))
53
54
55def run(canvas: list[list[bool]]) -> list[list[bool]]:

Callers 2

gaussian_distributionFunction · 0.85
game_of_life.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected