Sum and product of 2 and 3
Input
sum_and_product(2, 3)
Output
(5, 6)
2 + 3 = 5, 2 * 3 = 6, so return the tuple (5, 6).
Full lesson preview
Return multiple values from a function using tuples so callers can unpack results.
Problem statement
Task
Examples
Input
sum_and_product(2, 3)
Output
(5, 6)
2 + 3 = 5, 2 * 3 = 6, so return the tuple (5, 6).
Input format
Output format
Constraints
Samples
Input
sum_and_product(0, 5)
Output
(5, 0)
0 + 5 = 5, 0 * 5 = 0.