/complex_numbers_multiplication_division_addition_subtraction_modulus_python_assignment

""" For this assignment, you are given two complex numbers. You will print the result of their addition, subtraction, multiplication, division, and modulus operations. The real and imaginary precision part should be correct up to two decimal places. Input Format: One line of input: The real and imaginary part of a number separated by a space. Output Format: For two complex numbers and the output should be in the following sequence on separate lines: C + D C - D C * D C / D mod(C) mod(D) >> For complex numbers with non-zero real and imaginary part, the output should be in the following format: A + Bi >> Replace the plus symbol (+) with a minus symbol (-) when B<0. >> For complex numbers with a zero complex part, i.e. real numbers, the output should be: A + 0.00i >> For complex numbers where the real part is zero and the complex part is non-zero, the output should be: 0.00 + Bi """

Primary LanguagePython

Complex Numbers Multiplication, Division, Addition, Subtraction AND Modulus Python Assignment

""" For this assignment, you are given two complex numbers. You will print the result of their addition, subtraction, multiplication, division, and modulus operations. The real and imaginary precision part should be correct up to two decimal places.

Input Format: One line of input: The real and imaginary part of a number separated by a space.

Output Format: For two complex numbers and the output should be in the following sequence on separate lines:
C+D, C-D, C*D, C/D, mod(C), mod(D).

For complex numbers with non-zero real and imaginary part, the output should be in the following format:
A + Bi Replace the plus symbol (+) with a minus symbol (-) when B<0.

For complex numbers with a zero complex part, i.e. real numbers, the output should be:
A + 0.00i

For complex numbers where the real part is zero and the complex part is non-zero, the output should be:
0.00 + Bi

"""