The Python program below is intended to calculate and print the product (all numbers multiplied together) of a list of factors.
However, the program contains a logic error that prevents it from working as intended.
1 factors = [3, 5, 2, 4]
2 product = 0
3 for number in factors:
4 product = product * number
5 print("The total product is: " + str(product))
Identify the line number that contains the logic error, and write the corrected version of this line.
Your corrected line must be written in Python.
298 exam-style questions on AQA GCSE Computer Science Programming concepts. Each one has a worked solution and a mark scheme showing where the marks go.