Ad Code

Responsive Advertisement

Basic Python Program - 12.

Write a Python program to check if a Number is Positive, Negative or Zero.

IDE: Visual Studio Code ( VSC ). Present: go2collage.


Download hole Program / Project code, by clicking following link:


Programming Code:

# Basic Python Program # Check number is Positive, Negative and Zero num = float(input("Enter a number: ")) if num < 0:      # if number is less tha Zero(0) print(num," is Negative number.") elif num > 0: # if number is greater than Zero(0) print(num," is Positive number.") else:         # Otherwise number is Zero(0) print(num," is Zero number.")


Output:




Post a Comment

0 Comments

Ad Code

Responsive Advertisement