Multiply #WEEKLY Usage of math module
PYer (4017)

Using the math module, I managed to use an equation to multiply two numbers. I used the pow (to the tenth) function and log10, creating a lambda function here:
math.pow(10, (math.log10(a) + math.log10(b)))
I can't wait to see what other solutions people come up with!

You are viewing a single comment. View All
CodingCactus (4336)

awwwwwwww, it doesn't work with 0 as the second number :(

PYer (4017)

okay, i'll try and fix it @CodingCactus

PYer (4017)

Wait a moment. Dividing be 0 isn't possible. @CodingCactus

CodingCactus (4336)

@PYer but this was a multiplication challenge

PYer (4017)

Wait yeah. Nevermind, ignore that. Idk what I was thinking. @CodingCactus