Course Nine - Use numbers with Python

Use numbers with Python By ienex In Python, numeric data types are used to store numeric values. These values are immutable , meaning that changing a value creates a new object in memory rather than modifying the existing one. Creating Numeric Objects Numeric objects are created when a value is assigned to a variable: var1 = 1 var2 = 10 You can also delete numeric objects using the del statement: del var1 del var_a, var_b Numeric Data Types in Python Python supports four primary numeric types: Integer ( int ) : Whole numbers, positive or negative, without a decimal point. Long integer ( long ) : Integers of unlimited size. Denoted with L at the end (preferably uppercase to avoid confusion with the digit 1 ). Floating point ( float ) : Real numbers with a decimal point. Can also be expressed using scientific notation ( 5e2 = 5 × 10² ). Complex numbers ( complex ) : Numbers in the form a + bj , where a is the real part, b is the imaginary part, and j re...