Vidyalelo
Python · Q20

Python Built

Programming · Python · question 20

Q20

What is the output of the function complex()?

A.
0j
B.
0+0j
Answer
C.
0
D.
Error

Answer: Option B

Solution

Answer: Option B
Solution:
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.