Ethiopian multiplication: Difference between revisions

→‎{{header|Python}}: Cleanup, more in line with other examples
m (→‎{{header|Python}}: imap -> izip)
(→‎{{header|Python}}: Cleanup, more in line with other examples)
Line 2,366:
return x % 2 == 0
 
def ethiopian(xmultiplier, ymultiplicand):
returntable sum= list((p, q) for p, q in izip(halver(x), doubler(y)) if not even(p))</lang>
izip(halver(multiplier), doubler(multiplicand)))
return sum(q for p, q in table if not even(p))
</lang>
 
=={{header|R}}==
Anonymous user