MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / random

Method random

tests/test_pager_code.py:330–333  ·  view source on GitHub ↗

Get random number from 0 to max-1.

(self, max_val)

Source from the content-addressed store, hash-verified

328
329 # ========== RANDOM ==========
330 def random(self, max_val):
331 """Get random number from 0 to max-1."""
332 import random
333 return random.randint(0, max_val - 1)
334
335 def seed_random(self, seed):
336 """Seed the random number generator."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected