Computers and Technology

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
[]

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 15:00, billlyyyyyyyyyy
Visually impaired individuals generally rely on the for navigation. thus, designers need to ensure that mouse-specific inputs, such as pointing, clicking, and hovering, can be done without a mouse.
Answers: 1
image
Computers and Technology, 24.06.2019 03:40, Eylul30
4. does the kernel phenotype distribution support the idea that the cob is the result of a dihybrid cross? what information supports your answer? if a dihybrid cross (i. e. f1 to f2 of standard mendelian crosses) is not indicated what conditions might contribute to this finding.
Answers: 2
image
Computers and Technology, 24.06.2019 04:30, minecrafter3882
Fall protection, confined space entry procedures, controlled noise levels, and protection from chemical hazards are some of the things that contribute to a safe what
Answers: 1
image
Computers and Technology, 24.06.2019 13:00, juuuuuu42
George heard about the benefits of a data warehouse. he wants to try implementing one for his organization. however, he is afraid that transferring data to the data warehouse will affect transaction time. which element ensures that transactions are not affected when moving data to a warehouse? when data is transferred to a data warehouse, the a area frees the source system to continue transaction processing.
Answers: 2
Do you know the correct answer?
9. Write a function called sum_arrays that takes two lists of the same length and returns a list whe...

Questions in other subjects:

Konu
Mathematics, 19.07.2019 23:50