Positive Negative or Zero
Submit solution
Python
Points:
15
Time limit:
8.0s
Memory limit:
64M
Author:
Problem type
Allowed languages
Problem Definition
Given an integer as input, print whether it is Positive, Negative or Zero.
Input Format
Input will be a single integer
Output Format
Output will be any one of the following word (words are case-sensitive) - Positive, Negative, Zero
Sample Input
-543
Sample Output
Negative
Comments
num = int(input()) if num > 0 : print("Positive") elif num == 0 : print ("Zero" ) else : print("Negative")
num=int(input()) if(num==0): print("Zero") if(num>0): print("Positive") if(num<0): print("Negative")
number = int(input()) if(number==0): print("Zero") elif(number>0): print("Positive") else: print("negative")
num=int(input()) if(num==0): print("zero") elif (num<0): print("negative") else: print("positive")
number=int(input()) if (number==0): print("Zero") elif(number>0): print("Positive") else: print("Negative")
num==int(input()) if(num==0): print("Zero") if(num>0): print("Positive") if(num<0): print("Negative")
a = int(input("Enter the number")) if a==0: print("The number is zero") elif a>0: print("The number is positive") else: print("The number is negative")
...
num=int(input()) if(num==0): print("zero") if(num>0): print("positive") if(num<0): print("negative")
num = int(input()) if num > 0 : print("Positive") elif num == 0 : print ("Zero" ) else : print("Negative")
Python