Created
May 24, 2018 14:08
-
-
Save Fhernd/53bf77f6e24e365b46f4f6945416e7f1 to your computer and use it in GitHub Desktop.
Operaciones con números complejos. OrtizOL.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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