Last active
October 11, 2022 01:43
-
-
Save RaMSFT/76173bbc978a757fc0418cd9533094ad to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def is_same_num(num1, num2): | |
| """Check if given two numbers are equal | |
| Args: | |
| num1 (numeric): input numebr one | |
| num2 (numeric): input number two | |
| Returns: | |
| Boolean: Rteurn True when both numbers are same, else False | |
| """ | |
| if num1 == num2: | |
| result = True | |
| else: | |
| result = False | |
| return result | |
| print(is_same_num(4, 8)) | |
| print(is_same_num(2, 2)) | |
| print(is_same_num(2, "2")) | |
| print(is_same_num(4, 4)) | |
| print(is_same_num(8, 2*4)) | |
| print(is_same_num(22, "22")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment