Polar Coordinates

Sort by

recency

|

474 Discussions

|

  • + 0 comments

    This makes operations like multiplication and division much simpler, especially in trigonometry and signal processing. A great concept for anyone working with complex analysis or engineering applications! cricbet99 id create

  • + 0 comments

    Enter your code here. Read input from STDIN. Print output to STDOUT

    import cmath

    complejo = complex(input())

    print(complejo)

    con .real se obtiene la parte real y con .img se obtiene la parte imaginaria

    print(complejo.real, complejo.imag)

    imprime The modulus (absolute value) of a complex number x can be computed using the built-in abs() function. There is no separate cmath module function for this operation

    print(abs(complex(complejo.real, complejo.imag)))

    imprimir la fase con complex para llamar el numero complejo bien

    print(cmath.phase(complex(complejo.real, complejo.imag)))

  • + 0 comments

    import cmath z = complex(input()) a = abs(z) g = cmath.phase(z) print(f"{a}") print(f"{g}")

  • + 0 comments
    import cmath
    # generating a functhion << r_phase >>
    
    def r_phase(n=complex(input())):   # value must not be string so it's complex 
    
        print(f'{cmath.polar(n)[0]}\n{cmath.polar(n)[1]}')   #show abs and phase in    two lines
    
    r_phase()
    
  • + 0 comments
    1. import cmath
      1. n = input()
    2. complex_no = complex(n)
    3. real_part = complex_no.real
    4. imaginary_part = complex_no.imag
    5. print(abs(complex(imaginary_part,real_part)))
    6. print(cmath.phase(complex(real_part,imaginary_part)))