answersLogoWhite

0

What variable keeps a running total?

Updated: 12/10/2022
User Avatar

Wiki User

11y ago

Best Answer

The answer is "an accumulator."

"A running total is a sum of numbers that ACCUMULATES with each iteration of a loop. The variable used to keep the running total is called an accumulator."

It can be any variable you want! It could be total, tot, etc. Here is an example:

total = 0

randoms = [random.randRange(0, 99999)] * 100 # Creates a list of 100 random numbers

for number in randoms:

total += number

print(total) # Py3k print statement. Sample output: 35460

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What variable keeps a running total?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Does a sentinel variable keep a running total?

It is not common, but possible. (If the list members are numbers.)


Why is the amount of ozone variable in the atmosphere?

The amount of ozone is variable. It is because it keeps on forming and destroying.


Formula for total variable cost?

Total Variable Cost = Number of Units * Variable cost per unit


How do you calculate total variable expenses in a contribution income statement?

Total variable cost is typically the sum of all variable labor, variable materials, and variable overhead expenses.


Is responding variable the same as dependent variable?

There is in fact a difference. Depending Variable: Varies on the outcome of the Responding Variable. Responding Variable: Varies on the outcome of both itself and the Depending Variable. Math keeps us goin'!


How do you calculate variable cost per unit?

Variable cost per unit = Total variable cost / total number of units manufactured


How do you calculate Total Cost without Total variable cost?

To calculate the Total Cost without Total variable cost, one should estimate for the variables or substitute for the variables with a variable such as X or Y and then solve for the approximate total cost.


What is Total variable costs?

Total variable costs are the sum of expenses which change proportionally as the price of services and goods fluctuate. The total marginal costs above produced units is also referred to as total variable costs.


Is selling price and total variable cost the same?

Selling price = Total Cost (Total Variable cost + Total fixed cost) + profit margin


What is continuos variable?

it is like a big or huge distance from a place to another that keeps on


What does count equals count plus 1 and total equals total plus 1 in algorithm means?

This is an instruction to increment the value of a variable by 1 (in this case, either the variable count or the variable total).


What are some variable costs of running an airline?

sssssssssuuuuuuuuuucccccckkkkkkkkkk dddddddddiiiiiiiiiiiiiccccccccckkkkkkkk