Question 1
Write a function product_of_sum_and_abs_diff_of_digits(num) that takes a two-digit number (it may be negative, then ignore the sign) and returns the product of the sum of its two digits and the absolute difference of its two digits.
NOTE: This is a function type question, you don't have to take input or print the output, just have to complete the required function definition.
Example
product_of_sum_and_abs_diff_of_digits(54) -> 9
product_of_sum_and_abs_diff_of_digits(38) -> 55
Your task
Implement this function:
def product_of_sum_and_abs_diff_of_digits(num: int) -> int:
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: num.
Example
Input
54
Output
9