Report Bug

Qus

What will be the output of the following Python function?

sum(2,4,6)

sum([1,2,3])

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


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.
CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad