Q:

Write a Python program to compute average of two given lists

0

 Write a Python program to compute average of two given lists.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

def average_two_lists(nums1, nums2):
    result = sum(nums1 + nums2) / len(nums1 + nums2) 
    return result

nums1 = [1, 1, 3, 4, 4, 5, 6, 7]
nums2 = [0, 1, 2, 3, 4, 4, 5, 7, 8]
print("Original list:")
print(nums1)
print(nums2)

print("\nAverage of two lists:")
print(average_two_lists(nums1, nums2))

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now