Skip to content

Instantly share code, notes, and snippets.

@RaMSFT
Last active October 11, 2022 01:43
Show Gist options
  • Select an option

  • Save RaMSFT/76173bbc978a757fc0418cd9533094ad to your computer and use it in GitHub Desktop.

Select an option

Save RaMSFT/76173bbc978a757fc0418cd9533094ad to your computer and use it in GitHub Desktop.
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