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 trialJulie Egan
Courses Plus Student 703 Pointsi know it sounds dumb for the pros but I'm stuck...no idea what I'm doing wrong
i know it sounds dumb for the pros but I'm stuck...no idea what I'm doing wrong, I thought it was a simple creating a new variable with that string :(
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(';')
menu = 'Our available flavours are: {}.'.
4 Answers
stjarnan
Front End Web Development Techdegree Graduate 56,488 PointsHi Julie!
Guessing you're stuck on the second part of the challenge?
menu = "Our available flavors are: {}.".
Notice the dot you put aftet the string? Remove it, you don't need punctuation after your variables :)
Like this:
menu = "Our available flavours are: {}."
Does that help?
I would like to add a comment to your "I know it sounds dumb to you pros":
I work as a developer, and I want you to know that me and my colleagues get stuck all the time, it's part of the fun! Just learn to relax when you do get stuck, and tell yourself that all the developers out there get stuck, it's ok! I started my journey here at Treehouse too, and I failed at so many of the challenges at the beginning. Believe in yourself, because we have all been there and we know that you'll make it if you don't give up!
Jonas
glasscheck
7,302 Pointsavailable = "banana split;hot fudge;cherry;malted;black and white" sundaes = available.split(';') menu = ("Our available flavors are: {}." ).format(", ".join(sundaes))
Julie Egan
Courses Plus Student 703 Pointsthanks but I have tried that too and it doesn't work
Azizi Ali
Courses Plus Student 1,049 Pointsmaybe you just put .format(sundaes) at the end of 'menu'
menu = 'Our available flavors are: {}.'.format(sundaes)
btw, you must spell "flavors", not "flavours".
Julie Egan
Courses Plus Student 703 PointsThanks but that's not the right one neither. Flavours it is how it spelled in my country...
Julie Egan
Courses Plus Student 703 Pointsim laughing sooner than I thought!!! you were right!!! thanks stjarnan :)
stjarnan
Front End Web Development Techdegree Graduate 56,488 PointsAwesome! Happy to help :)
And remember, everyone gets stuck, getting better just means that you learn where to look for the errors :)
Julie Egan
Courses Plus Student 703 PointsJulie Egan
Courses Plus Student 703 Pointshi Jonas thanks for your kind words, self studying hasn't been easy for me, sometimes a word of encouragement and support makes a lot of difference!! so thank you ever so much.
about the code...well I'm still stuck, I have tried so many ways but the right one seems to be lost to me :( have searched it on youtube and google and nothing, I get the same answer but it doesn't work in here, I will keep trying though, I want one day to look at this post and laugh. :)
stjarnan
Front End Web Development Techdegree Graduate 56,488 Pointsstjarnan
Front End Web Development Techdegree Graduate 56,488 PointsDid you try copying the second code snippet from my post? Compare that one to what you wrote and perhaps you can find out where you went wrong :)
Good luck!