I'LL GIVE BRAINLIEST Program to total all numbers in a list: Create an empty list Ask user to enter a number to add to the list. Continue to ask user to enter a number and continue adding the number to the list until user enter “stop” Add all the numbers in the list and display the total

Respuesta :

tonb

Answer:

numberlist = []

str = ""

while str != "stop":

 str = input("Enter a number: ")

 if str != "stop":

   try:

     numberlist.append(float(str))

   except:

     print("Ignoring", str)

print("The sum is ",sum(numberlist))

Explanation:

This solution also supports floating point numbers!

Answer:

Explanation:

list = []

while True:

num = input("Enter a number: ")

if num == "stop":

break

list.append(int(num))

total = 0

for i in list:

total += i

print(total)