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

Need help i don't get it
What a consequence brings the fact that the cerebral cortex is more developed in humans than in animals
What document created by William Penn influenced the US Constitution? А. Manual of Law and Order B. Charter of Legal Systems C. Frame of Government D. Declarati
Which person best represents the values of Romanticism? A. a politician who supports the rights of members of labor unions B. a writer who argues that all prop
make a list of social evils based on rituals​
Answer this question in 150––200 words: What do the two animals depicted in Blake’s poems “The Lamb” and “The Tyger” symbolize? Explain how these depict the con
2 KCIO3 —>2 KCl + 3 02 Calculate how many grams of O2(g) can be produced from heating 19.3 g KCIO,(s). mass:___?___ g O2
Can someone help me with this
Create your own 6 sentences that can warning people about scams. 1. 2. 3. and so on
What is the nth term rule of the linear sequence below? -9, -5, -1,3,7,...
good job