Your question is Multiply Without Operator. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Kroger’s pricing systems may need arithmetic utilities that operate under restricted-operation rules. Implement integer multiplication without using Python’s multiplication operator, built-in multiplication functions, exponentiation, or string conversion.
Write multiply_integers(a, b) that accepts two integers and returns their mathematical product as an integer. The inputs may be positive, negative, or zero. Your implementation may use addition, subtraction, division or remainder, comparisons, loops, and bit operations, but it must not use * anywhere in the algorithm.
Aim for an algorithm that uses repeated doubling rather than adding one operand once for every unit of the other operand. The result will fit within the supported integer range.
def multiply_integers(a, b):