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 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz