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

Function repeated_is_tails

example_code/item_023.py:128–130  ·  view source on GitHub ↗
(count)

Source from the content-addressed store, hash-verified

126
127print("Example 11")
128def repeated_is_tails(count):
129 for _ in range(count):
130 yield flip_is_tails()
131
132all_heads = not any(repeated_is_tails(20))
133assert not all_heads

Callers 1

item_023.pyFile · 0.85

Calls 1

flip_is_tailsFunction · 0.85

Tested by

no test coverage detected