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

Method __init__

dice.py:11–14  ·  view source on GitHub ↗

Initializes the die. Defaults to 6 sides if no value is provided.

(self, sides=6)

Source from the content-addressed store, hash-verified

9 """
10
11 def __init__(self, sides=6):
12 """Initializes the die. Defaults to 6 sides if no value is provided."""
13 self.sides = 6 # Internal default
14 self.set_sides(sides)
15
16 def set_sides(self, num_sides):
17 """

Callers

nothing calls this directly

Calls 1

set_sidesMethod · 0.95

Tested by

no test coverage detected