Below is the code to check whether the given number is positive or negative
# to check whether a given number is positive or negative
a=int(input("Enter a number:"))
if a==0:
print("Given number is neither negative nor positive")
elif a<0:
print("The number is negative")
else:
print("The number is positive")
Output:
Enter a number:-7
The number is negative