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 trialIan Esson
474 Pointsjoin and split task 3 of 3 keeps going back to "oops! it looks like Task 2 is no longer passing "
tested this in the workspace without error but each time when verifying the code, the error message 'Task 2 no longer passing' comes up
- available = "banana split;hot fudge;cherry;malted;black and white"
- sundaes=available.split(';')
- menu="our available flavors are:{},"
- display_menu="(',').join(sundaes)"
- menu=display_menu.format(sundaes)
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes=available.split(';')
menu="our available flavors are:{},"
display_menu="(',').join(sundaes)"
menu=display_menu.format(sundaes)
3 Answers
Bryan Reed
11,747 Pointsavailable = "banana split;hot fudge;cherry;malted;black and white"
sundaes=available.split(';')
menu="our available flavors are:{},"
display_menu="(',').join(sundaes)"
# When you reassign menu below, you're getting rid of the string "our available flavors are:{}"
menu=display_menu.format(sundaes)
Try this
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes=available.split(';')
menu = 'Our available flavors are:{}'
display_menu = menu.format((',').join(sundaes))
Ian Esson
474 PointsThanks Bryan Reed. I am not sure if there is bug or something but I now i am getting this error Bummer! Did you use ", ".join()?
I tired the code in another IDE and it worked so i am positive your suggestions is good but its not being accepted for some reason.
Results from Repl.it display_menu
=> 'Our available flavors are:banana split,hot fudge,cherry,malted,black and white'
Ken Alger
Treehouse TeacherIan;
When you are joining there needs to be a space after the comma. ',<space here>'
Post back if you are still stuck.
Ken
Ian Esson
474 PointsIan Esson
474 Pointsthink i figured task 2 error but now getting that task 1 is not passing
available = "banana split;hot fudge;cherry;malted;black and white" sundaes=available.split(';') menu="our available flavors are:{}," display_menu=",".join(sundaes)" menu=display_menu.format(sundaes