📜  复杂阶段python代码示例

📅  最后修改于: 2022-03-11 14:45:24.672000             🧑  作者: Mango

代码示例1
# calc the magnitude (abs) and the phase of a complex number 
from cmath import phase # No need to import abs()

c = 1 + 2j
print(abs(c)) # Should print 2.23606797749979
print(phase(c)) # Should print 1.1071487177940904