Challenge 1
Create a complex value with real part 2 and imaginary part -3 using the constructor.
value =
print(value)
Press Ctrl⌘Enter to check your answer
Practice constructing complex numbers, reading their components, combining them with arithmetic, and promoting a real value to complex.
Challenge 1
value =
print(value)
Press Ctrl⌘Enter to check your answer
Challenge 2
value = 7 + 2j
real_part =
imaginary_part = value.imag
print(real_part, imaginary_part)
Press Ctrl⌘Enter to check your answer
Challenge 3
left = 2 + 3j
right = -1 + 4j
total =
print(total)
Press Ctrl⌘Enter to check your answer
Challenge 4
measurement = 6.5
value =
print(value, type(value).__name__)
Press Ctrl⌘Enter to check your answer