logo

Crowdly

What will be the output of the following Python code? def increment_items(L, i...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

What will be the output of the following Python code?

def increment_items(L, increment):

    i = 0

    while i < len(L):

        L[i] = L[i] + increment

        i = i + 1

 

values = [1, 2, 3]

print(increment_items(values, 2))

print(values)

a)

   None

   [3, 4, 5]

b)

   None

   [1, 2, 3]

c)

   [3, 4, 5]

   [1, 2, 3]

d)

   [3, 4, 5]

   None

More questions like this

Want instant access to all verified answers on moodle.ulsachihuahua.edu.mx?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!