Question: The function adds all of the elements from list1 and list2, and returns the result. The size of each list is n . How many
The function adds all of the elements from list1 and list2, and returns the result. The size of each list is n. How many times is the addition operation performed? Provide a reason to back up your answer.

def calculate(list1, list2): result = for i in range(len(list1)): result += list1 [i] for j in range(len(list2)): result += list2 [j] return result
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
