Python - cmath.rect() method Last Updated : 01 Jun, 2020 Comments Improve Suggest changes Like Article Like Report cmath is a Python built-in module that is used for complex number mathematics. cmath module has a method rect() that is used to convert polar coordinate into rectangular form. Syntax: cmath.rect(r, phi) Parameter: It take two arguments. First argument r, denotes the modulus of the complex number and the second argument denotes the phase. Both arguments are required. None is optional. Return: Returns a complex number Z whose modulus is r and phase is phi. Note: r * (math.cos(phi) + math.sin(phi)*1j) is equivalent to this method. Example 1: Python3 # Import the Library import cmath # Printing the result print (cmath.rect(3,10)) Output: (-2.517214587229357-1.6320633326681093j) Example 2: In this example modulus is taken as zero. Python3 # Import the Library import cmath # Printing the result print (cmath.rect(0,1)) Output: 0j Example 3: In this example phase is taken as zero Python3 # Import the Library import cmath # Printing the result print (cmath.rect(1,0)) Output: (1+0j) Comment More infoAdvertise with us Next Article Python - cmath.rect() method A aman neekhara Follow Improve Article Tags : Python Python Cmath-library Practice Tags : python Similar Reads Python | cmath.sqrt() method With the help of cmath.sqrt() method, we can find the value of square root any number by passing it to cmath.sqrt() method. Syntax : cmath.sqrt(value) Return : Return the square root of any value. Example #1 : In this example we can see that by using cmath.sqrt() method, we are able to get the value 1 min read Python | cmath.log() method With the help of cmath.log() method, we can find the value of log of any number having natural base value by passing it to cmath.log() method. Syntax : cmath.log(value) Return : Return the log value of natural base. Example #1 : In this example we can see that by using cmath.log() method, we are abl 1 min read Python | cmath.exp() method With the help of cmath.exp() method, we can find the exponent of any number by passing it to cmath.exp() method. Syntax : cmath.exp(value) Return : Return the exponential value. Example #1 : In this example we can see that by using cmath.exp() method, we are able to get the values of exponent by pas 1 min read Python | cmath.log10() method With the help of cmath.log10() method, we can find the value of log of any number having base-10 value by passing it to cmath.log10() method. Syntax : cmath.log10(value) Return : Return the log value of base-10. Example #1 : In this example we can see that by using cmath.log10() method, we are able 1 min read rect element method - Selenium Python Seleniumâs Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. To open a webpage using Selenium Python, checkout - Navigating links using get method â Selenium Python. Just bein 2 min read Like