MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / determine_weight

Function determine_weight

example_code/item_121.py:52–54  ·  view source on GitHub ↗
(volume, density)

Source from the content-addressed store, hash-verified

50print("Example 1")
51# my_module.py
52def determine_weight(volume, density):
53 if density <= 0:
54 raise ValueError("Density must be positive")
55
56
57try:

Callers 1

item_121.pyFile · 0.85

Calls 3

InvalidDensityErrorClass · 0.85
InvalidVolumeErrorClass · 0.85

Tested by

no test coverage detected