Arithmetic in V2
Today we talk about the rules of arithmetic in Python Version 2. The key detail is when combining two numbers, Python will widen numbers to make sure they are all of the same type. (In Python v2, there are four numeric types: ints, longs, floats and complex numbers.) Also, when you divide two whole numbers, Python will return the quotient, not the mathematical value. And beware of division by 0!
Today we talk about the rules of arithmetic in Python Version 2. The key detail is when combining two numbers, Python will widen numbers to make sure they are all of the same type. (In Python v2, there are four numeric types: ints, longs, floats and complex numbers.) Also, when you divide two whole numbers, Python will return the quotient, not the mathematical value. And beware of division by 0!