Q1. How can I extract values from a def() function? Specifically, in these instances, either a or b values.
def absoluteA (a): a = abs(a) b = -a return (b,a) print(absoluteA(4)) def absoluteB (a): a = abs(a) b = -abs(a) return (b,a) print(absoluteB(5))
# result (-4, 4) (-5, 5)
Q2: How do I multiply two set of numbers?
First def() + 2nd def() doesn’t work. Thus, returning to the 1st question.
I searched Google but was unable to obtain the solution I desired.