From 5c01d319f5f7a98a7e855a4e25554fc0f500df1c Mon Sep 17 00:00:00 2001 From: Emmanuel Di Pretoro Date: Thu, 9 Jul 2026 15:35:22 +0200 Subject: [PATCH] Adding a stub for the initcounters method and the pseudocode for it --- noid.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/noid.py b/noid.py index 2dfb8bc..c5f9fb4 100644 --- a/noid.py +++ b/noid.py @@ -97,6 +97,25 @@ class Minter(): # 10. return the noid return "" + def initcounters() -> None: + # 1. Initialize oacounter to 0 + # 2. Set up a maxcounters variable to 293 + # 3. Set up a percounter variable to int(total / maxcounters + 1) + # 4. Divides $total into sub-counters of size $pctr, stores this + # distribution in $noid, and prepares the structure to generate + # IDs in a balanced manner. + # - copy the value of total to the variable t + # - copy the value of percounter to pctr + # - initialize saclist as an empty string (list) + # - while t is more than zero + # - set up the top value for the counter + # `$t >= $pctr ? $pctr : $t` + # - set value of this counter to 0 + # - add the counter to saclist + # - substract pctr from t + pass + + if __name__ == "__main__": import doctest doctest.testmod()