This project contains Python code for performing basic operations with complex numbers using NumPy. The user can input the real and imaginary parts of two complex numbers from the keyboard. The script also provides the results of various operations.
- Addition
- Subtraction
- Multiplication
- Division
- Magnitude
- Conjugate
-
Clone the repository:
git clone https://github.com/Chinilshik-kalkulatorov/ImaginaryProgression.git
-
Navigate to the project directory:
cd ImaginaryProgression
-
Install the dependencies:
pip install -r requirements.txt
-
Run the Python script:
python complex_operations.py
-
Follow the prompts to input the real and imaginary parts of the complex numbers. The script will then display the results of various operations.
After running the script, you will be prompted to enter the real and imaginary parts of two complex numbers. The script will then display the results of various operations.
Enter the first complex number:
Enter the real part: 1
Enter the imaginary part: 2
Enter the second complex number:
Enter the real part: 3
Enter the imaginary part: 4
Complex number 1: (1+2j)
Complex number 2: (3+4j)
Addition (c1 + c2): (4+6j)
Subtraction (c1 - c2): (-2-2j)
Multiplication (c1 * c2): (-5+10j)
Division (c1 / c2): (0.44+0.08j)
Magnitude of c1 (|c1|): 2.23606797749979
Magnitude of c2 (|c2|): 5.0
Conjugate of c1: (1-2j)
Conjugate of c2: (3-4j)
- Python 3.x
- NumPy
Install the dependencies using pip:
pip install numpy
This project is licensed under the MIT License.