Challenge: Multiple Return Values
This lesson brings you a challenge to solve.
We'll cover the following
Problem statement
Write a function that accepts two integers and returns their sum, product and difference (in the same order). Make a version with named return variables.
Input
Two numbers of type int
Output
Sum, product, and difference between two numbers
Sample input
3, 4
Sample output
7,12,-1 // 3+4=7, 3*4=12, and 3-4=-1
Try to implement the function below. Feel free to view the solution, after giving some shots. Good Luck!
Get hands-on with 1400+ tech skills courses.