Smallest of Two

Beginner

In this fun and simple challenge, you will need to write a function that takes two numbers and returns the smallest of them! It's like a friendly competition between the numbers to see who is the smallest. 🎉

Your task is to create a function named smallest_of_two that accepts two parameters, both numbers, and returns the smaller one of the two. Easy peasy, right?

Here's what your function should look like:

smallest_of_two(4, 10) # should return 4 smallest_of_two(7, 3) # should return 3 smallest_of_two(5, 5) # should return 5 (since they are equal, return any of them)

Remember, the function should not print anything or take any input from the user. It should only return the smallest number of the two given.

Geek
Inputs

Arg 1:

4

Arg 2:

10
Expected Output
4
Actual Output
Smallest of Two [beginner] | Coding for Kids