Python Program Check Positive Number

By | January 8, 2023

Python Program Check Positive Number – Write a Python program to input a number and check whether the given number is positive, negative or zero. Use Python if-elif-else construct.

Python Program Check Positive Number, negative or zero

Python Program Check Positive, Negative or Zero Number

# Python program to check a number
# for positive, negative or zero

num = int(input('Enter a number: '))
if num > 0:
    print('The number is positive')
elif num < 0:
    print('The number is negative')
    print('The number is zero')


Enter a number: 7
The number is positive

Enter a number: -56
The number is negative

Enter a number: 0
The number is zero

Python GUI ( Graphcal User Interface ) Programs using tkinter Module

New arrivals programs / tutorials / articles/ Updates on Python GUI ( Graphcal User Interface ) Programs using tkinter Module
  1. Find Factorial by Recursive Function Python GUI Program
  2. Multiplication Table Python GUI Program
  3. Python GUI Program Area of Triangle with base and height
  4. Python GUI Temperature Conversion Program Celsius to Fahrenhiet
  5. Python GUI Program Temperature Conversion Fahrenheit to Celsius
  6. Python Pounds to Kilogram Converter GUI tkinter Program
  7. Python 3 Four Function Calculator Program tkinter GUI
  8. Python Digital Clock Program using tkinter GUI
  9. Python Quotes Changer Program tkinter GUI
  10. Python 3 tkinter Spinbox GUI Program Example
  11. Python 3 tkinter Message Widget Program Examples
  12. Python 3 GUI Program tkinter Radio Buttons
  13. Adding Menus to Python 3 tkinter GUI Programs
  14. Python 3 GUI Program Add Two Numbers
  15. Explain Python grid Geometry Manager with Example Code
  16. Python 3 GUI Miles to Kilometers Converter tkinter Program
  17. Python 3 tkinter GUI Kilogram to Pounds Program
  18. Python Set Label Text on Button Click tkinter GUI Program
  19. Show Label and Button Widgets Python Tkinter Program
  20. Python 3 Tkinter GUI Hello World Program
  21. Create and Show Root Window of tkinter GUI Program


Leave a Reply

Your email address will not be published. Required fields are marked *