data types booleans |there are two built-in boolean objectstrue and false like all other python data types (whether built-inlibraryor custom)the bool data type can be called as function--with no arguments it returns falsewith bool argument it returns copy of the argumentand with any other argument it attempts to convert the given object to bool all the built-in and standard library data types can be converted to produce boolean valueand it is easy to provide boolean conversions for custom data types here are couple of boolean assignments and couple of boolean expressionst true false and false and true true logical operators as we noted earlierpython provides three logical operatorsandorand not both and and or use short-circuit logic and return the operand that determined the resultwhereas not always returns either true or false programmers who have been using older versions of python sometimes use and instead of true and falsethis almost always works finebut new code should use the built-in boolean objects when boolean value is required floating-point types ||python provides three kinds of floating-point valuesthe built-in float and complex typesand the decimal decimal type from the standard library all three are immutable type float holds double-precision floating-point numbers whose range depends on the (or cor javacompiler python was built withthey have limited precision and cannot reliably be compared for equality numbers of type float are written with decimal pointor using exponential notationfor example - - - computers natively represent floating-point numbers using base --this means that some decimals can be represented exactly (such as )but others only approximately (such as and furthermorethe representation uses fixed number of bitsso there is limit to the number of digits that can be held here is salutary example typed into idle - - ( -