cs/Practical File/question_09.py
Neil Revin cc8b0efe94
feat: add practical file projects
Signed-off-by: Neil <neil@willofsteel.me>
2025-06-24 02:28:22 +05:30

16 lines
343 B
Python

# Question: Write a Python program to check if a number is positive, negative, or zero.
def main(num: int) -> None:
if num > 0:
print(f"{num} is positive.")
elif num < 0:
print(f"{num} is negative.")
else:
print("The number is zero.")
if __name__ == '__main__':
main(10)
main(-5)
main(0)