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 trialGary Gibson
5,011 PointsPassed Task 3 without changing a thing from Task 2...?
I didn't change a thing after I passed Task 2 and hit "Check Work" and got the same code to pass for Task 3. Why is this?
4 Answers
Giorgi Kiknadze
952 PointsHere is all answers:
Task 1:
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(';')
Task 2:
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(";")
menu = "Our available flavors are: {}."
Task 3:
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(";")
menu = "Our available flavors are: {}.".format(', '.join(sundaes))
And it works, I've tried. :)
Gavin Ralston
28,770 PointsPerhaps you added the format() method and formatted the string already in step 2?
Step 2 only asks for you to create the string and store it in menu, step 3 asked for the format() method to be called.
Jason Anders
Treehouse Moderator 145,860 PointsHey Gary,
It may have just been a weird glitch you encountered. I just ran through the quiz and Task 3 would not pass until I entered in the correct code for that part. If I just clicked "check work", I got "Bummer! Did you use .join(", ")?"
:)
Gary Gibson
5,011 PointsAh, I see. I did Task 3 as part of Task 2. I'm a little surprised the test didn't reprimand me for jumping ahead.
Giorgi Kiknadze
952 PointsGiorgi Kiknadze
952 PointsI think you used join like this:
.format(sundaes.join(', '))