Adding a stub for the initcounters method and the pseudocode for it
This commit is contained in:
@@ -97,6 +97,25 @@ class Minter():
|
|||||||
# 10. return the noid
|
# 10. return the noid
|
||||||
return ""
|
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__":
|
if __name__ == "__main__":
|
||||||
import doctest
|
import doctest
|
||||||
doctest.testmod()
|
doctest.testmod()
|
||||||
|
|||||||
Reference in New Issue
Block a user