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

9x to the power of 2 plus 7x -2 from 8x - 10
We is going fishing saturday Correct the sentence.
2/3% of 300 Find the percent by making a proportion.
Jerry has a lot of cousins! He has 5 times as many younger cousins as older cousins. If Jerry has 12 more younger cousins than older cousins, how many cousins d
How many valence electrons will the cation Al2+ have?
Cristiano has 42 apples in his bag and his brother has only 16. How many apples should Cristiano give his brother so they both have the same number of apples?​
HELP PLZ OMG ill give kiss if helped
Solve for x: 6x-20=x+40
i don’t know what it is, help
Sophie and Marcos are each saving for new bicycles. So far, Sophie has $6 saved and can earn $5 per hour walking dogs. Marcos has $3 saved and can earn $6 per h