Skip to content

Commit 42a928c

Browse files
authored
oddeven
to check whether a given number is odd or even.
1 parent f581e7e commit 42a928c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

oddeven

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
print("hello world")
2+
num = int(input("Enter a number: "))
3+
mod = num % 2
4+
if mod > 0:
5+
print("This is an odd number.")
6+
else:
7+
print("This is an even number.")

0 commit comments

Comments
 (0)