Page 1 of 1

Complete the following code so that it iterates through the two lists of numbers parallel, and adds up their same-index

Posted: Mon May 09, 2022 6:06 am
by answerhappygod
Complete The Following Code So That It Iterates Through The Two Lists Of Numbers Parallel And Adds Up Their Same Index 1
Complete The Following Code So That It Iterates Through The Two Lists Of Numbers Parallel And Adds Up Their Same Index 1 (24.1 KiB) Viewed 22 times
Complete the following code so that it iterates through the two lists of numbers parallel, and adds up their same-index values one-by-one. In case the sum (variable summa) is more than 25, break out of the loop. Submit the .py file in manaba R+. Name the file the following way: ip.ex44.<student id number>py. number_list_1 = [1,2,3,4,5,6,7,8,9,10,11] number_list_2 - (10,11,12,13,14,15,16,17,18,19,20] print("Length of the first list:", len()) #check the length of the first list print("Length of the second list:", len()) #check the length of the second list for number 1, number_2 in zip(): #iterate through the two lists! summa = #complete to add up the same-index values print("The sum is", summa) #print the sum if summa #complete to check if summa is more than 25, and in that case, break out of the Loop