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 trialUnsubscribed User
4,479 PointsMy string was incorrect because I spelt 'flavors' - 'flavours'. Are we learning Python or American English?
I'm hoping you regard your fine school as international.
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(";")
menu = "Our available flavors are: {}.".format(sundaes)
4 Answers
Chris Freeman
Treehouse Moderator 68,454 Points"of my own creation" is the contention. I agree that the challenge should accommodate international variances when a value is left up to the coder's discretion.
In this challenge, the string value is explicitly stated as "Our available flavors are: {}." eliminating the coder's preferences.
Adding internationalization to text in the challenges is a valid request which would have made the challenge read as "Our available flavours are: {}." and increase the international appeal of Treehouse.
Tagging Kenneth Love for comment.
Luke Glazebrook
13,564 PointsHi Rory!
The reason it works like this is because when you are submitting an answer the website will detect for a certain answer and if it isn't that then it will throw back a failure. In this case, spelling flavor as flavour caused the site to throw back that error.
This may seem like a picky thing but in reality you will experience these types of things when you are programming. For example, the following CSS is valid:
h1 {
color: blue;
}
But this isn't:
h1 {
colour: blue;
}
I hope that I managed to help you out!
Unsubscribed User
4,479 Points'color' is a WW3 recognised CSS property. "Flavors" was part of a string of my own creation.
Unsubscribed User
4,479 PointsThanks Chris. I will be sure to follow all the strings as explicit values.