Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created May 24, 2018 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fhernd/53bf77f6e24e365b46f4f6945416e7f1 to your computer and use it in GitHub Desktop.
Save Fhernd/53bf77f6e24e365b46f4f6945416e7f1 to your computer and use it in GitHub Desktop.
Operaciones con números complejos. OrtizOL.
import cmath
numero1 = complex(2, 4)
numero2 = 3 - 5j
print(numero1)
print(numero2)
print(numero1.real)
print(numero2.imag)
print(numero1.conjugate())
print(numero1 + numero2)
print(numero1 * numero2)
print(numero1 / numero2)
print(abs(numero1))
print(cmath.sin(numero1))
print(cmath.cos(numero1))
print(cmath.exp(numero1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment