Python - WAP to Print a Integer is Positive or Negative in Python - 04
This is a Python Source Code to determine if a Integer is Positive or Negative.
Source Code:
#!/usr/bin/Python3 while True: Num = int(input("Enter a Number : ")) if ( Num < 0 ): print ("The Number '%d' is a Negative Integer!" % (Num) ) elif ( Num > 0 ): print ("The Number '%d' is a Positive Integer!" % (Num) ) else: print ("The Number is '0'") print ("-Codegig.org") if (input("To Continue ['y'/n] : ")) == 'y': continue else: break
Program Output:
...
Post a Comment