Smallest of Three
Beginner
In this challenge, you'll write a function to help a tiny robot choose the smallest marble from a collection of marbles. The robot has three marbles with different weights, and it needs to determine which one is the lightest!
Your task is to write a Python function named smallest_of_three that receives three numbers, each representing the weight of a marble, and returns the smallest of the three numbers.
Here's a robot illustration to help visualize:
- 🤖 has ⚖️
- It's comparing marbles: 🟡 (2.3g), 🔵 (3.1g), 🔴 (1.5g)
- Result should be: 🔴 (1.5g) as it's the lightest.
Example
smallest_of_three(5.5, 2.2, 3.3)
should return:
2.2
smallest_of_three(1.0, 0.5, 1.5)
should return:
0.5
So, help our tiny robot succeed in choosing the lightest marble!
Fun Fact
Did you know that marbles were used as early as 4000 BC in Ancient Egypt!? "Small but mighty!" much like our tiny robot friend and this function you'll be writing.
Inputs
Arg 1:
5.5Arg 2:
2.2Arg 3:
3.3Expected Output
2.2Actual Output