Tuesday 6 November 2012

Check Even or Odd with Logical Operator NOT


#Here is the Working of Not opertator..........

num=input('Enter A Number: ')
if not num%2==0:
     print num, 'is Odd.'
else:
    print num, 'is Even.'

No comments:

Post a Comment