What does "Use the existing code as a scaffold" mean?


This is the instructions

"Define a function called print_list that has one argument called x.
Inside that function, print out each element one by one.
Use the existing code as a scaffold.
Then call your function with the argument n."

Problem is I don't know what "scaffold" means. I looked it up and it has something to do with buildings. Not sure what's it asking me to do.

n = [3, 5, 7]

for i in range(0, len(n)):
    print n[i]


It means you can fashion your code after the example given, meaning the structure and concepts will be similar or the same.

def function(arg):    <<< scaffold

def print_list(n):    <<< for this

Please post a link to this exercise if you still have questions.



Here's a link

this is what I put

n = [3, 5, 7]

for i in range(0, len(n)):
print n[i]
def print_list(x):
for i in x:
print i

and this is the error I get "Oops, try again. The body of your function should not contain any references to 'n'"

Thanks for your time.


Its best to just build your code around what is already typed. Build your function, then indent the code they have given you. Edit their variables and make it your own. This way you avoid errors like "your code should not reference n"