Need help with the "Code Challenge:Lists


When you ask a question, don’t forget to include a link to the exercise or project you’re dealing with!

If you want to have the best chances of getting a useful answer quickly, make sure you follow our guidelines about how to ask a good question. That way you’ll be helping everyone – helping people to answer your question and helping others who are stuck to find the question and answer! :slight_smile:

Don’t know what to do.


Saw the solution but still no idea what to do.:roll_eyes::thinking::tired_face::sleeping:


Break the problem down into simple steps, starting with a block:

def func_name (params):


Follow that with a call so you can see that it matches the function name.

print (func_name(arguments))

If index is not a valid index, the function should return the original list.

So now we have a conditional and a possible return value.

    if index < len(list_param):
        # run the code
    return list_param

The function should double the value of the element at index of lst and return the new list with the doubled value.

        list_param[index] *= 2

Now just put it all together with the correct names on objects given in the instructions, along with the expected parameters and arguments.