Hey guys, in this blog we will see a Python Program to Check if a Number is Positive, Negative, or 0.
Code
# Python Program to Check if a Number is Positive, Negative or 0
num = input('Enter the number -> ')
num = float(num)
if num==0:
print('You have entered 0')
elif num <0:
print(f'{num} is a negative number')
else:
print(f'{num} is a positive number')
Output
Enter the number -> 12 12 is a positive number
Enter the number -> -13 -13 is a negative number
Enter the number -> 0 You have entered 0
- First of all, we are simply taking input from the user.
- Converting it to float.
- And then simply use if/else to check if the number is equal to 0, less than 0, or greater than 0.
Check out our other python programming examples…


![[Latest] Python for Loops with Examples – Easiest Tutorial – 2025](https://machinelearningprojects.net/wp-content/uploads/2023/05/python-for-loops-1-1024x536.webp)


