Skip to content

Commit 5b4c3d9

Browse files
committed
integer.py
1 parent 5db5266 commit 5b4c3d9

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

integer.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!usr/bin/env python3
2+
# Made by Maximiliano Fairman
3+
# Created on oct 20th 2025
4+
# This program is a number checker
5+
# that checks if the input is positive or negative
6+
# or zero.
7+
8+
# Ask the user to enter an integer
9+
user_input = float(input("Enter an integer: "))
10+
11+
# Check if the number is positive
12+
if user_input > 0:
13+
print("The number is positive.")
14+
15+
# Check if the number is negative
16+
elif user_input < 0:
17+
print("The number is negative.")
18+
19+
# If the number is zero
20+
else:
21+
print("The number is zero.")
22+
23+
# Print done once program is finished
24+
print("\nDone.")

0 commit comments

Comments
 (0)