Header Ads Widget

Python program to check whether a number is negative, positive or zero

  Python program to check whether a number is negative, positive or zero

Given a numbers , write a program to check that whether a number is negative, positive or zero .

Sample input

4

Sample output

Number is Positive number

 Python program to check whether a number is negative, positive or zero

The objective of the code is to check whether a number is negative, positive or zero .

Code(Python):-

a=int(input())
if a==0:
print("Number is Zero")
elif a>0:
print("Number is Positive number")
else:
print("Number is Negative number")

Output:-

4
Number is Positive number

Recommended Post :-

HCL Coding Questions:-

Capgemini Coding Questions:-

Companies interview:-

Full C course:-    

Key points:-

Cracking the coding interview:-

 Array and string:-

Tree and graph:-

Hackerearth Problems:-

Hackerrank Problems:-

Data structure:-

 MCQs:-