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 trialDalton Bird
1,164 PointsI do not understand the question. I am having a rough time figuring out exactly what the questions wants me to do.
This question makes no sense to me.
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(";")
display_menu = sundaes.join(", ")
menu = "our available flavors are: {}.".format(", )
2 Answers
Steven Parker
231,271 PointsIt looks like you haven't quite finished that last line. But you also have the arguments reversed for join
.
Now join
is a string method that takes a list as an argument. But here you have applied it to a list and given it a string as an argument. You'll need to switch those around.
Then just provide the argument to format
on the last line and you should have it.
Conrad Cortes
8,418 PointsHey Dalton stay with it! I'm having a hard time too but I'm pushing through the lessons and I'm finding that now I can go back to the older tasks and complete them on my own now. The later lessons get more advanced but the basics always come back at some point and it clicked for me once it was presented in a new way.
Dalton Bird
1,164 PointsDalton Bird
1,164 PointsThank you, Steven, for your response. But I have attempted to perform the changes you suggested but still have not been able to complete the exercise. I don't think that I am understanding the content of the lesson. Here is the code that I submitted after reading your explanation.
Steven Parker
231,271 PointsSteven Parker
231,271 PointsYou were right the first time to join "sundaes" instead of "available". But you needed to swap things around:
display_menu = ", ".join(sundaes)
Dalton Bird
1,164 PointsDalton Bird
1,164 PointsSteven Parker,
The code that you provided allowed me to complete the exercise but I honestly still don't understand why that worked. I thank you for your time but I don't think that I will be able to complete this coursework due to my inability to understand the subject matter.
Steven Parker
231,271 PointsSteven Parker
231,271 PointsDalton Bird,
Temporary learning blocks are not uncommon at all. You might get a different perspective by reading this other forum post titled The Wall. And you might also enjoy this recent episode of The Treehouse Show where it was featured (including my own answer!).