?
What is the output of the function complex()?
Answer & Solution
Correct Answer:
Option
B
The correct answer is Option B: 0+0j.
The complex() function in Python is used to create a complex number.
When no arguments are passed, it returns 0 as the real and imaginary parts, resulting in the complex number 0+0j.
The complex() function in Python is used to create a complex number.
When no arguments are passed, it returns 0 as the real and imaginary parts, resulting in the complex number 0+0j.
Join the Discussion
Login to post a comment or share your explanation.
Login