Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python sumproduct excel

list1 = [1, 2, 3]
list2 = [4, 5, 6]

product_for_sum = []
for i in range(0, len(list1)):
   product_for_sum.append(list1[i]*list2[i])
sumproduct = sum(product_for_sum)

print(sumproduct)
# (1*4) + (2*5) + (3*6)
# = 4 + 10 + 18
# = 32 
Comment

PREVIOUS NEXT
Code Example
Python :: *9c0xxbz] 
Python :: dict keys in tcl 
Python :: convert a float array to an integer 
Python :: difference between iglob() and glob() functions in python 
Python :: pyt last of range of numbers 
Python :: python split respect quotes 
Python :: Find meta tag of a website in python 
Python :: Python NumPy broadcast_arrays() Function Syntax 
Python :: Python NumPy ndarray.T Example 
Python :: run all pycharm jupyter notebook 
Python :: with statement in python 
Python :: Python3: Deleting even and only showing uneven numbers from, set list. 
Python :: Python NumPy asscalar Function Syntax 
Python :: Python NumPy array_split Function Example 02 
Python :: Python NumPy delete Function Example Deletion performed using Boolean Mask 
Python :: python how to loop through array 
Python :: __le__ 
Python :: function nbYear(p0, percent, aug, p) { let n = 0; while(p0 < p) { p0 = p0 + Math.round(p0 * (percent/100)) + aug; n ++; } return n; } 
Python :: sourcetrail index library python 
Python :: django view - mixins and GenericAPIView (retrieve, update or delete - GET, PUT, DELETE) 
Python :: turn dictionary into flat list 
Python :: Python pattern of 1010101 
Python :: how to swap a lowercase character to uppercase in python 
Python :: lda from scratch implementation on iris python 
Python :: loop regex 
Python :: problème barbier semaphore python 
Python :: how to click button and download a file using robot frame work or selenium, it not contains link 
Python :: Python (cpython 2.7.16) sample 
Python :: pandas maxima and minima for given column 
Python :: swagger django 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =