Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] Type "help", "copyright", "credits" or "license" for more information. >>> true Traceback (most recent call last): File "", line 1, in NameError: name 'true' is not defined >>> True True >>> False False >>> type(True) >>> not True False >>> not False True >>> True and True True >>> True and False False >>> True or False True >>> x= True >>> x True >>> x or x True >>> x and False False >>> not x False >>> 5>3 True >>> 3>5 False >>> 4.0>2 True >>> 4==4.0 True >>> x=5 >>> x>5 False >>> x>5.0 False >>> x>=5.0 True >>> 5+7>4*3 or 1-2>2-4 and 15==4 False >>> ((5+7)>(4*3)) or ((1-2)>(2-4)) and 15==4 False >>> x=4 >>> x and True True >>> x=-4 >>> x and True True >>> x=0 >>> x and True 0 >>> x=4 >>> x or True 4 >>> True or x True >>> y= True or x >>> y True >>> y= x or True >>> y 4 >>> x=x+True >>> x 5 >>> x=x+True >>> x 6 >>> x=x+False >>> x 6 >>> ((5+7)>(4*3)) or ((1-2)>(2-4)) and 15 15 >>> def if_odd(x): ... if x%2==1: ... return True ... Traceback (most recent call last): File "", line 1, in IndentationError: expected an indented block (, line 2) >>> def f1(): ... return 4 ... Traceback (most recent call last): File "", line 1, in IndentationError: expected an indented block (, line 2) >>>