Je suis nouveau à Python alors s'il vous plaît ours avec moi. Le problème est:nombre complexe à la forme polaire en python
"Ecrivez une fonction polaire (z) pour convertir un nombre complexe en sa forme polaire (r, thêta) Vous pouvez utiliser les fonctions math.atan2 et math.hypot mais pas la bibliothèque cmath. "
Je ne sais même pas où commencer avec celui-ci, mais jusqu'à présent je:
import math
def polar(z):
z = a + bj
r = math.hypot(a,b)
theta = math.atan2(b,a)
print "(",r,",",theta,")"
Toute aide fera!