Question: 99. The following function is supposed to add 1 to every element in a list of integers. Def addOne(values): For i in range(len( values)): Values[i]

99. The following function is supposed to add 1 to every element in a list of integers. Def addOne(values): For i in range(len( values)): Values[i] = values[i]+1 What is wrong with the following function? A) The statement prints( values) must be added to the end of the function. B) the statement return values must be added to the end of the function C) the for loop must be replaced with a while loop D) there is nothing wrong with the function
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
