ExamVeda
Login
Home
Python Built In Functions
?

What will be the output of the following Python function?
complex(1+2j)

Answer & Solution
Correct Answer: Option D
The correct answer is Option D: 1+2j.
The complex() function in Python is used to create a complex number from real and imaginary parts. When you pass the expression 1+2j to the complex() function, it returns the complex number with real part 1 and imaginary part 2j.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.