NIELIT O Level Exam

<p>What will be the output of the following Python code?</p><pre>data = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]<br>def ttt(m):<br>&nbsp; &nbsp; v = m[0][0]<br>&nbsp; &nbsp; for row in m:<br>&nbsp; &nbsp; &nbsp; &nbsp; for element in row:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if v &lt; element: v = element&nbsp; &nbsp; &nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; return v<br>print(ttt(data[0]))</pre>

What will be the output of the following Python code?

data = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]
def ttt(m):
    v = m[0][0]
    for row in m:
        for element in row:
            if v < element: v = element     
        return v
print(ttt(data[0]))


निम्नलिखित Python कोड का आउटपुट क्या होगा?

data = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]
def ttt(m):
    v = m[0][0]
    for row in m:
        for element in row:
            if v < element: v = element     
        return v
print(ttt(data[0]))

A. 1

B. 2

C. 4

D. 5




Correct Answer is :

B. 2



Explanation
Execute in the shell to verify.
Latest Current Affairs 2025 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