← Back to challenges

Are the Numbers Equal?

PythonMediumnumberslanguage_fundamentalsconditionsvalidation

Instructions

Create a function that returns True when num1 is equal to num2; otherwise return False.

Examples

is_same_num(4, 8) ➞ False

is_same_num(2, 2) ➞  True

is_same_num(2, "2") ➞ False

Notes

Don't forget to return the result.

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Is the Number Less than or Equal to Zero?