subject

9. Write a function called sum_arrays that takes two lists of the same length and returns a list where each element is the sum of the
elements at that index in the original list. The function should retum the empty
list if the parameters are not the same size
Sample Run 1:
I
a = (1, 2, 3, 4, 5]
b = [10, 20, 30, 40, 50]
print(sum_arrays (a, b))
Should output
[11, 22, 33, 44, 55]
Sample Run 2:
a = [1, 2, 3, 4, 5)
b = (10, 20, 30, 40, 50, 60]
print(sum_arrays(a, b))
Should output
[]

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 03:10
Acomputer has a two-level cache. suppose that 60% of the memory references hit on the first level cache, 35% hit on the second level, and 5% miss. the access times are 5 nsec, 15 nsec, and 60 nsec, respectively, where the times for the level 2 cache and memory start counting at the moment it is known that they are needed (e.g., a level 2 cache access does not even start until the level 1 cache miss occurs). what is the average access time?
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
Companies that implement and apply an information system effectively can create
Answers: 1
question
Computers and Technology, 24.06.2019 10:00
(, urgent need): how do i change my username
Answers: 1
question
Computers and Technology, 24.06.2019 12:00
Which spreadsheet operation does a look function perform?
Answers: 1
You know the right answer?
9. Write a function called sum_arrays that takes two lists of the same length and returns a list whe...
Questions