Skip to content

total [terminology]

Terminology

Usage

  • Use for an additive numeric accumulator.
  • It represents a running sum rather than a number of items.
  • Prefer a domain-specific name such as profit when it communicates more.
  • Do not use it for multiplicative accumulators, frequencies, or optimum tracking.
total = 0

for ch in s:
    total += romans[ch]