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

explain why the reaction between calcium carbonate and sulphuric acid would not get to completion ​
WILL MARK BRAINLIEST Determine the length of LP​
The Red one is wrong also the blue mark means nothing
Elliott states that he absolute value and opposite of a number are the same thing. Is Elliott correct? Explain. ​
Compare the two expressions using an inequality symbol.PLSSSSS HELP 100 PTS8×(−2)−(−4)2□ 36÷9+2×58×(-2)-(-4)□36÷9+2×5Question 2 options:=>
Given h(x)=-5x+1, solve for x when h(x)=-4h.
your favorite type of advertising
Given: ΔABC, CM⊥AB, BC = 5, AB = 7, CA = 4√2 Find: CM
Prove segment BD = segment CA
Light bulbs cost £3.40 each. Yasmin buys as many as she can with £30. How much change should she get? Give your answer in pounds, £.