Skip to content

Commit

Permalink
Even odd code
Browse files Browse the repository at this point in the history
  • Loading branch information
gouravanirudh05 committed Oct 16, 2024
1 parent 759e057 commit 2506bea
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Program's_Contributed_By_Contributors/Python_Programs/evenodd.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Function to check if a number is odd or even
def check_odd_even(number):
if number % 2 == 0:
return f"{number} is Even"
else:
return f"{number} is Odd"

# Input from user
number = int(input("Enter a number: "))

# Output the result
print(check_odd_even(number))

0 comments on commit 2506bea

Please sign in to comment.