Skip to content
This repository has been archived by the owner on Oct 29, 2023. It is now read-only.

Add Python function for checking if a number is even or odd #203

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions is-even-function/is-even-function.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
def is_even(num):
return num % 2 == 0

result1 = is_even(6)
result2 = is_even(7)

print(result1) # Should print True
print(result2) # Should print False