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 trialDidier Borel
2,837 Pointstask 1 no longer passing
hi Treehouse, I have done this code challenge now about 20 times, each time I get to task 3, I get the error message ; "task 1 no longer passing",Basically I refuse to do it again, until you correct the problem on your end.
here is my code for task 3
menu="Our available flavors are: {}".format(.", "join(flavors))
Please give me credit for this code challenge or correct the problem on your end. Basically I can't continue taking the course until I get past this. The email reminders you send me everyday just bring me back to this code challenge.
This
available = "banana split;hot fudge;cherry;malted;black and white"
2 Answers
Carlos Federico Puebla Larregle
21,074 PointsWhen you split the string variable called "available" with the function "split", you transformed it to a list. With the join function you want to make it a String again, joining every part of that newly created list with a comma and a white space. If you print the menu you should see something like this:
Our available flavors are: banana split, hot fudge, cherry, malted, black and white.
Carlos Federico Puebla Larregle
21,074 PointsYou are really almost there. You forgot to put the dot (.) between the string and the "join" method instead of putting the dot in front of the string (", "). Try doing it like this:
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(";")
menu = "Our available flavors are: {}.".format(", ".join(sundaes))
I hope that helps a little bit
Didier Borel
2,837 Pointsthxs Carlos, that finally did the trick. I thought the problem was a bug, but I see it was a my code. This again for your help.
1 question though, I don't see why I have to use the join function. Why could I not jut type .format(sundaes) ?