NIELIT O Level Exam

<p>What will be the output of the following Python code?</p><pre>def m(list):<br>&nbsp; &nbsp; v = list[0]<br>&nbsp; &nbsp; for e in list:<br>&nbsp; &nbsp; &nbsp; &nbsp; if v &lt; e:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v = e<br>&nbsp; &nbsp; return v<br>&nbsp; &nbsp;<br>values = [[3, 4, 5, 1], [33, 6, 1, 2]]&nbsp; &nbsp;<br>for row in values:&nbsp;<br>&nbsp; &nbsp; &nbsp; print(m(row), end = " ")</pre>

What will be the output of the following Python code?

def m(list):
    v = list[0]
    for e in list:
        if v < e:
            v = e
    return v
   
values = [[3, 4, 5, 1], [33, 6, 1, 2]]   
for row in values: 
      print(m(row), end = " ")


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

def m(list):
    v = list[0]
    for e in list:
        if v < e:
            v = e
    return v
   
values = [[3, 4, 5, 1], [33, 6, 1, 2]]   
for row in values: 
      print(m(row), end = " ")

A. 3 33

B. 1 1

C. 5 6

D. 5 33




Correct Answer is :

D. 5 33



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