Skip to content

Instantly share code, notes, and snippets.

@prav-raghu
Created January 25, 2022 18:47
Show Gist options
  • Save prav-raghu/5c41452e52c04df41271bfa071bb9ae7 to your computer and use it in GitHub Desktop.
Save prav-raghu/5c41452e52c04df41271bfa071bb9ae7 to your computer and use it in GitHub Desktop.
def is_even(k):
if(k ^ 1 == k+1):
return True
else:
return False
k = input("Please provide a number: ")
print(is_even(int(k)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment