Python can do complex arithmetic for you. Here you write it yourself, with each number kept as two real numbers: is the pair (a, b).
The idea. . Expand the top to find its real and imaginary parts.
Your tasks.
conjugate, return the conjugate of as a pair.modulus, return .divide, return as a pair.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…
With Standard, you also open 11 more problems, 2 Python labs and 1 extra course. Everything you have used here stays free, always.