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.
Latest Current Affairs 2024 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad