class documentation

class GeometricProgression(Progression):

View In Hierarchy

Iterator producing a geometric progression.

Method __init__ Create a new geometric progression.
Method _advance Update current value by multiplying it by the base value.
Instance Variable _base Undocumented

Inherited from Progression:

Method __iter__ By convention, an iterator must return itself as an iterator.
Method __next__ Return the next element, or else raise StopIteration error.
Method print_progression Print next n values of the progression.
Instance Variable _current Undocumented
def __init__(self, base=2, start=1):

Create a new geometric progression.

base the fixed constant multiplied to each term (default 2) start the first term of the progression (default 1)

def _advance(self):

Update current value by multiplying it by the base value.

_base =

Undocumented