MCPcopy Create free account
hub / github.com/Mrinank-Bhowmick/python-beginner-projects / Neuron

Class Neuron

projects/Neurons/main.py:28–35  ·  view source on GitHub ↗

String subclass to return character representing a neuron.

Source from the content-addressed store, hash-verified

26
27
28class Neuron(str):
29 """String subclass to return character representing a neuron."""
30
31 CHAR = "██"
32 CHANCE_OF_DEATH = 35
33
34 def __new__(cls) -> str:
35 return str.__new__(cls, cls.CHAR)
36
37
38class Grid:

Callers 2

set_neuronMethod · 0.70
tickMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected