NPTEL solution
ONLINE TEST 2-5 PM | Solution for NPTEL Programming, Data Structures and Algorithms using Python
All answers have been verified. Question – 1 :- Here is an function to return the maximum value in a list of integers. There is an error in this function. Provide an input list for whichmaxbad produces an incorrect output. def maxbad(l): mymax = 0 for i in range(len(l)): if l[i] > mymax: mymax = l[i] return(mymax) Answer:- [-3,-2,-1] [quads id=1] Question Read more…