## Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

### Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

PLUS

# TabError: elif add_list == 'HELP':

Where am I going wrong. I do not see it.

functions.py
```# add_list([1, 2, 3]) should return 6
# summarize([1, 2, 3]) should return "The sum of [1, 2, 3] is 6."
# Note: both functions will only take *one* argument each.

# Make a function named add_list that takes a list.
# The function should then add all of the items in the list together and return the total.
# Assume the list contains only numbers.
# You'll probably want to use a for loop.
# You will not need to use input().

# add_list([1, 2, 3]) should return 6
# summarize([1, 2, 3]) should return "The sum of [1, 2, 3] is 6."
# Note: both functions will only take *one* argument each.

def show_help():
print ("Enter 'DONE' to stop.")
print ("Enter 'HELP' for this help.")
print ("Enter 'SHOW' to see your current list")

num_list.append(items)

def show_list():

show_help()

`while True:
break
continue
show_help()
continue
show_list()
continue`
```

okay so are you stuck in the first part? of the challenge because your approaching it wrong. so lists are iterables, which means that we can go through them one by one. so what we want to do is for example if we have the list = [1, 2, 3] we want to loop over the first item in the list and add it to a variable. lets says that variable is results = 0. after the first loop results is going to be results = 1, then on the second loop we are going to add the current value of results PLUS the current item being looped over. in this case its 2. so now results = 3, and then we do it a third time. results = 6 after the 3rd loop.

```def add_list(list):
results = 0
for number in list:
results += int(number)
return results
```

also notice how i wrote int(number) thats just in case the original list has numbers in their string version. we want to convert them to int so they can be added.

let me know if thats what you needed or if your stuck on the second part of the challenge. also let me know if its a bit confusing

Thank you Michael,

I appreciate you setting me straight on the beginning of my program.

I still get errors at the bottom.

I also am curious about +=. I have seen == but not +=. Please fill me in as to what this does.

I am curious about how to debug my own errors.

Thank you,

Mark

PLUS

I regrouped and started over and obtained this solution. For a while I thought I was going to be stuck.

```def add_list(num_list):

total = 0

for i in num_list:

total = total + i

```

yeah no problem. and okay so for the " += ". im assuming you know the difference between " = " and " ==".. one is assignement "=" and the other means 'equal to' "==". so in essence what is happening with " += " is that we are adding and then assigning. in reality this is how it looks " results = results + int(number) " you could write it like this if it makes it easier to understand but youll get used to the logic. you could also do " -= " which means we subtract first and then assign.. then you could also do " =+ " or " =-" in these case we are assigning and then adding, subtracting.

by errors at the bottom? are you referring to you code?

btw mark, if you wanted to do it the way you were doing it, you would have to change a couple things around. i copied your code and modified it so that it would work. this is my version:

```current_list = []
def show_help():
print ("Enter 'DONE' to stop.")
print ("Enter 'HELP' for this help.")
print ("Enter 'SHOW' to see your current list")

results = 0
for number in current_list:
results += int(number)
print (results)
return results

def show_list():
print ("Here is your list: {}". format(current_list))

show_help()

while True:
user_input = input(">>>: ").lower()
if user_input == 'done':
break
show_list()
continue
elif user_input == 'help':
show_help()
continue
elif user_input == "show":
show_list()
continue
else:
current_list.append(user_input)
show_list()
continue
```

the main difference is that you write a way for the user to put his numbers or the choice he wants (help, show...ect)
```

Thank you Michael,

I have been working on the code and I still get errors. I am stuck. I have been experimenting. Also, is there a way that you can watch videos without all your work disappearing? I do not know what I am missing.

Also, I notice you use lower case for done, help, show, and add. I assume this means that capital and lower case letters can be interchanged.

I hope I work out my error(s) soon.

Thank you,

Mark