Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

complex():

Vinay Rawal answered on April 1, 2023 Popularity 3/10 Helpfulness 1/10

Contents


More Related Answers

  • Complex Numbers
  • complex number constructor
  • complex expression in programming
  • A Complex Example#
  • some more complex example

  • complex():

    0

    We can use complex() function to convert other types to complex type.

    Form-1: complex(x) We can use this function to convert x into complex number with real part x and imaginary part 0.

    Eg: 1) complex(10)==>10+0j 2) complex(10.5)===>10.5+0j 3) complex(True)==>1+0j 4) complex(False)==>0j 5) complex("10")==>10+0j 6) complex("10.5")==>10.5+0j 7) complex("ten") 8) ValueError: complex() arg is a malformed string

    21 https://www.youtube.com/durgasoftware

    Form-2: complex(x,y)

    We can use this method to convert x and y into complex number such that x will be real part and y will be imaginary part.

    Eg: complex(10, -2)  10-2j complex(True, False)  1+0j 

    Popularity 3/10 Helpfulness 1/10 Language javascript
    Source: Grepper
    Tags: javascript
    Link to this answer
    Share Copy Link
    Contributed on Apr 01 2023
    Vinay Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.