close

imaginary numbers in python

Hello guys. How are you all? I hope you all fine. In this tutorial we will learn about imaginary numbers in python. so without wasting time lets learn about of this.

imaginary numbers in python

  1. How imaginary numbers works in python?

    To Use imaginary numbers in Python Just Use numpy.array() By using numpy.array() you can print imaginary numbers in python. Lets learn about of this by given below example:
    import numpy as np arr = np.array([9+6j,5+6j,5+2j]) print(arr)
    Output :
    [9.+6.j 5.+6.j 5.+2.j]

  2. imaginary numbers in python

    To Use imaginary numbers in Python Just Use mathematical operation By using mathematical operation you can print imaginary numbers in python. Lets learn about of this by given below example:
    a = 9 + 8j b = 6 + 3j c = (a.imag + b.imag) print(c) print('after multiplication = ', a*b)
    Output :
    11.0 after multiplication = (30+75j)

  3. python imaginary number

    To Use imaginary numbers in Python Just Use mathematical operation By using mathematical operation you can print imaginary numbers in python. Lets learn about of this by given below example:
    a = 9 + 8j b = 6 + 3j c = (a.imag + b.imag) print(c) print('after multiplication = ', a*b)
    Output :
    11.0 after multiplication = (30+75j)

Method 1: Use numpy.array()

By using numpy.array() you can print. Lets learn about of this by given below example:

import numpy as np
arr = np.array([9+6j,5+6j,5+2j])
print(arr)

Output :

[9.+6.j 5.+6.j  5.+2.j]

Method 2: Use mathematical operation

By using mathematical operation you can print imaginary numbers. Lets learn about of this by given below example:

a = 9 + 8j
b = 6 + 3j
c = (a.imag + b.imag)
print(c)
print('after multiplication = ', a*b)

Output :

11.0
after multiplication =  (30+75j)

Conclusion

It’s all About this Tutorial. Hope all methods helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which method worked for you?

Also, Read

Please Rate Our Solution to Motivate Us For Give Our Best

Leave a Comment