Answer the question
In order to leave comments, you need to log in
How to multiply the values of n tables, and then add the resulting values n times?
How to do something similar to the sum of products from exel, in the i position of the list there is a list with values \u200b\u200bthat need to be multiplied, and then add all possible products together. So for a list like this:
sale_transactions =
for i in range(0, len(sale_transactions)):
sale_transactions[i][4] * sale_transactions[i][5]
print(purchase_transactions)
Answer the question
In order to leave comments, you need to log in
I understood only from the 10th time what it was about -))
you can do it like this:
sum = 0
for row in sale_transactions:
sum += row[4] * row[5]
print(sum)
How to multiply the values of n tables, and then add the resulting values n times?
Do you yourself understand what you need to multiply and add? )
and your meaningless)
for i in range(0, len(sale_transactions)):
sale_transactions[i][4] * sale_transactions[i][5]
print(purchase_transactions)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question