[Solved] Python evaluates the program without error, sum and average are correct but the product is always the same


I think you need to read the tutorials in more detail as you are making the task too complicated. This code might give you an idea of the how the task might be achieved.

text = input("Please enter your numbers separated by a space,\nPress the Enter Key when finished >> ")

# if you want to split a text string at whitespace use split()

text_numbers = text.split()

# then if you want to convert the text to a number

numbers = [float(i) for i in text_numbers]    

# to add the numbers together use sum()

total = sum(numbers)

# to find the product and keeping the method obvious
product = 1
for i in numbers :
    if i != 0 :
        product *= i

# the number of numbers can be found from the length of the list, len()

average = total/len(numbers)

print ("total: %.3f product: %.3f average: %.3f" % (total, product, average))

solved Python evaluates the program without error, sum and average are correct but the product is always the same