Discover a wealth of knowledge at Westonci.ca, where experts provide answers to your most pressing questions. Get detailed and precise answers to your questions from a dedicated community of experts on our Q&A platform. Connect with a community of professionals ready to help you find accurate solutions to your questions quickly and efficiently.

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.

Sample Run Enter a number: 1 Enter a number: 41 Enter a number: 36 Enter a number: 25 Sum: 103 Numbers Entered: 4


Sagot :

total = 0

count = 0

while total<=100:

   total += int(input("Enter a number: "))

   count += 1

print("Sum:",total)

print("Numbers Entered:",count)

I wrote my code in python 3.8. I hope this helps

Answer:

total = 0

count = 0

while total<=100:

  total += int(input("Enter a number: "))

  count += 1

print("Sum:",total)

print("Numbers Entered:",count)

Explanation: