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


#1

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]


#2

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.


#3

https://www.codecademy.com/courses/python-beginner-nzzVa/3/1?curriculum_id=4f89dab3d788890003000096

Here's a link

this is what I put
'''python

n = [3, 5, 7]

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

'''
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.


#4

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"