Anonymous user
Ethiopian multiplication: Difference between revisions
→{{header|Python}}: Final (I hope) cleanup. Sorry for the many edits :-)
(→{{header|Python}}: Cleanup, more in line with other examples) |
(→{{header|Python}}: Final (I hope) cleanup. Sorry for the many edits :-)) |
||
Line 2,349:
return result</lang>
Using generators,
<lang python>from itertools import izip
Line 2,367:
def ethiopian(multiplier, multiplicand):
table =
izip(halver(multiplier), doubler(multiplicand))
return result</lang>
=={{header|R}}==
|