python conjugate 1

python conjugate

from fractions import Fraction

num1 = Fraction(2, 7)
num2 = Fraction(3, 8)
print(num1 * num2)

z = 1 + 1j

Here is what the above code is Doing:
1. We import the Fraction class from the fractions module.
2. We create two Fraction objects, num1 and num2.
3. We multiply the two objects together and print the result.
4. We create a complex number, z, and add 2 to it.
5. We print the conjugate of z.

Similar Posts