by liz4rdm4n on Sat Feb 21, 2015 5:58 pm
([msg=86864]see Complex numbers in python[/msg])
I haven't really used complex numbers in python and I'm not 100% sure how they exactly work,
I'm trying to solve this puzzle below and I'm stuck at the prod_ab = part. I've not googled incase I get the answer - all I'm hoping for is a little pointer to help me solve it.
I need the sum and product of 2 complex numbers:
# (2+3j) and (4+5j)
a = 2+3j
b = 4+5j
sum_ab = a+b
prod_ab = ???
Edit* This is what they're expecting - obviously I got the sum right, but I have no idea how they got -7+22j?
product(a,b) (-7+22j)
sum(a,b) (6+8j)