Python Program to Check Whether a Number is Even or Odd
Check if a Number is Positive or Negative in Python
Given an integer input, The objective is to write a code to Check if a Number is Positive or Negative in Python Language.
For Instance,Input : Num = -5
Output : The number is Negative
For a user input num
If the num > 0: it is a positive number.
If the num < 0: it is a positive number.
Else the number has to be zero itself
num = int(input("Enter a number")
if num == 0:
print("Number is Zero")
elif num > 0:
print("Number is Positive")
print("Number is Negative")
Enter a number: 22
The number is Positive