SHARE
TWEET

Untitled

a guest Oct 21st, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from pip._vendor.distlib.compat import raw_input
  2.  
  3. var = 1
  4. while var == 1:
  5.     n = raw_input('Enter a number: ')
  6.     if n == 'stop':
  7.         var = var + 1
  8.         break
  9.     else:
  10.         n = int(n)
  11.  
  12.     if n % 2 == 0:
  13.         print('%d is even number' % n)
  14.     else:
  15.         print('%d is odd number' % n)
  16.     if n > 0:
  17.         print('%d is positive number' % n)
  18.     elif n == 0:
  19.         print('%d is zero' % n)
  20.     else:
  21.         print('%d is negative number')
  22. print
  23. 'bye!'
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top