Skip to content

Commit ced22db

Browse files
Unit3-04-Python
1 parent cdefc1e commit ced22db

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

Integer.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env python3
2+
# Created by: Patrick
3+
# Created on: 10/16/2025
4+
# This program ask user for a integer saying if its positive negative or zero
5+
6+
7+
def main():
8+
# Ask the user for an integer
9+
user_input = int(input("Give me a Number: "))
10+
11+
# Checks if number is positive
12+
if user_input > 0:
13+
print("This number is positive.")
14+
15+
# Checks if number is negative
16+
elif user_input < 0:
17+
print("This number is negative.")
18+
19+
# Checks if number is zero
20+
elif user_input == 0:
21+
print("The is a zero.")
22+
23+
# If its not a number
24+
else:
25+
print("No idea.")
26+
27+
28+
if __name__ == "__main__":
29+
main()

0 commit comments

Comments
 (0)