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 trialeynuax
779 PointsTask 1 is no longer passing
without changing task 1 or 2 - when I go to check my work on task three it says Task 1 is no longer passing. i repeat the process giving differrent answers and reloading the page but the same thing continues to happen
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(';')
menu = "Our available flavors are: {}."
display_menu = sundaes.join(', ')
menu.format(display_menu)
2 Answers
Steven Parker
231,271 PointsYou're really close, but I see two issues. First, "join" is the opposite of "split" in that it is a string method that takes a sequence as an argument. So you need two swap those terms around. It may look a bit strange until you get used to it.
Then, when you apply format to "menu", you still need to assign the result back to "menu".
Fix those and you should have it!
Christian A. Castro
30,501 Pointsxuanye You only need to fix the last two sentence of your code..
For example:
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(';')
menu = "Our available flavors are: {}."
display_menu = ", ".join(sundaes)
menu = 'Our available flavors are: {}.'.format(display_menu)
It should works perfectly fine on your end!
eynuax
779 PointsThanks Christian!
eynuax
779 Pointseynuax
779 Pointsthanks for your help!
I see where I went wrong re:"join" - display_menu = ", ".join(sundaes)
but I'm not sure what it means to "reassign" the results of the "format" back to menu.
Steven Parker
231,271 PointsSteven Parker
231,271 PointsYour last line produces the correct result string, but doesn't put it anywhere. To reassign the results back to menu that last line should begin with "
menu =
".eynuax
779 Pointseynuax
779 PointsThank Steven! - I'm just getting used to all the terminology - I was thinking it was something much harder than it was. thanks again :)