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

The ____ criteria filter requires the records displayed to start with the specified text string
To succeed in this Disney quiz, you’ll need the “bare necessities” of life covered, as sung by Balloo. But which of these isn’t a bare necessity?
Find the value of x in the following figure. Show equations and work that lead to your answer.
the hittites were the first society to use this as a weapon
10 times as many as _ hundreds is 60 hundreds or _ thousands
According to the rate law, how do concentrations affect rate?
Systems of equations: Elimination method 7y+15=3x 15=3x+2y
what historical reasons did the northerners abolish slavery?
sodium and diatomic chlorine react to form sodium chloride. Determine the equation , then balance it in order to find what mass of chlorine is needed to make 11
Mr. Nakamora wants to test the accuracy of an old balance in his classroom compared to a brand new balance that he knows is accurate. He weighs an objec on the