Q:

Write a Python program to find the maximum and minimum product from the pairs of tuple within a given list

0

Write a Python program to find the maximum and minimum product from the pairs of tuple within a given list

All Answers

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

def tuple_max_val(nums):
    result_max = max([abs(x * y) for x, y in nums] )
    result_min = min([abs(x * y) for x, y in nums] )
    return result_max,result_min
nums = [(2, 7), (2, 6), (1, 8), (4, 9)]   
print("The original list, tuple : ") 
print(nums)
print("\nMaximum and minimum product from the pairs of the said tuple of list:")
print(tuple_max_val(nums)) 

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