vncolella2006 vncolella2006
  • 08-11-2020
  • Computers and Technology
contestada

Write a program that inputs numbers and keeps a running sum. When the sum is greater than 100, output the sum as well as the count of how many numbers were entered.

Respuesta :

Cytokine
Cytokine Cytokine
  • 08-11-2020

total = 0

count = 0

while total < 100:

   num = int(input("Enter a number: "))

   total += num

   count += 1

print("Sum: {}".format(total))

print("Numbers Entered: {}".format(count))

I'm pretty sure this is what you're looking for. Best of luck!

Answer Link

Otras preguntas

How did the Germans Feel about "The Treaty of Versailles"...?
what factor is paired with 5 to give 45?
factor out the coefficient of the variable -3.6z - 10.8 =
what factor is paired with 5 to give 45?
Can someone please help me? The question in the square red box.
How did Spain structure it's American empire ?
What is the basic unit of organization of all living things
identify the like terms and terms 1.4c + 11.4 - 2c - 7.3c =
how to find cotangent 510 degree what is the steps
85% of what number is 10.2