(adsbygoogle = window.adsbygoogle || []).push({ google_ad_client: "ca-pub-2960223314593660", enable_page_level_ads: true }); Program to find if the entered number is positive,negative or zero - TecGlance

Header Ads

Program to find if the entered number is positive,negative or zero



=================== POSITIVE , NEGATIVE OR  ZERO  ======================



 a=input("Enter a number :")

 if a>=0:

     if a>0:

         print "The Entered Number is Positive"

     else:

         print "The Entered Number is Zero"

 else:

     print "The Entered Number is Negative"





========================= OUTPUT ================================



 Enter a number :85

 The Entered Number is Positive



========================= OUTPUT ================================



 Enter a number :0

 The Entered Number is Zero



========================= OUTPUT ================================



 Enter a number :-42

 The Entered Number is Negative



=================================================================

No comments

Powered by Blogger.