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.
Start your free trialroger penuela
Courses Plus Student 5,427 Pointsi am trying to create a while loop that ask the user for input then enters the input on a list to packing to return tota
funtion to add a series of list
def test_t(*a): a1 = sum(a) return a1
list to be enter on the funtion
li_st = [] while True: li_st = input("please enter all numbers")
the problem is that after you type done the list will contain the string DONE which will cause a error
if (li_st == "DONE"):
int(li_st)
la = test_t(li_st)
print(la)
break
else:
continue
2 Answers
roger penuela
Courses Plus Student 5,427 Pointsfuntion to add a series of list
def test_t(*a): a1 = sum(a) return a1
list to be enter on the funtion
li_st = [] while True: li_st = input("please enter all numbers")
the problem is that after you type done the list will contain the string DONE which will cause a error
if (li_st == "DONE"):
int(li_st)
la = test_t(li_st)
print(la)
break
else:
continue
this is the true code no that change made by the system
roger penuela
Courses Plus Student 5,427 Pointsi hate this question system you can not write the code because the teamtrehouse system changes and add what ever they want making it impossible for anyone to follow what is the problem with the code and express all problem associate