Report Bug
Qus :

What will be the output of the following Python function?

sum(2,4,6)
sum([1,2,3])

Qus

निम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?

sum(2,4,6)
sum([1,2,3])


A. Error, 6
B. 12, Error
C. 12, 6
D. Error, Error


Solution
A. Error, 6



Explanation
The first function will result in an error because the function sum() is used to find the sum of iterable numbers. Hence the outcomes will be Error and 6 respectively.



Report Bug