We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Math
- Polar Coordinates
- Discussions
Polar Coordinates
Polar Coordinates
Sort by
recency
|
474 Discussions
|
Please Login in order to post a comment
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
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)))
import cmath z = complex(input()) a = abs(z) g = cmath.phase(z) print(f"{a}") print(f"{g}")