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 trialMichelle Mangwiro
Courses Plus Student 467 PointsWhere am I going wrong on the shopping challenge
I don't seem to understand where I am going wrong. I have put the variable in small letters and the equal sign. The second variable though, I haven't a clue with what to do with it.
full_name = Michelle Mangwiro
name_list = full_name()split.
3 Answers
George Zabel
5,194 PointsZachary covered it pretty well, but I'll show you this, using apples as an example
apple as a string :
"apple"
apple as a variable:
apple
apple as a function:
basket.apple()
apple as an argument:
basket.fill(apple)
OK, so now that you know this...do your code!
So If I'm calling a lowercase function on my name , I'd write:
name = "George"
new_name = name.lower()
Just do a similar thing, but you're using 'split' instead of 'lower'.
Please upvote and mark as best answer if this was helpful :)
Zachary Hudson
Courses Plus Student 12,154 PointsHey Michelle!
Couple of issues for you to work through here.
1.) Your full_name variable call looks ok, but your name isn't formatted properly. You need to store that as a string so it's actually text. Hint: Use quotations.
2.) name_list variable call looks ok as well, but the part following after it is a bit jumbled up. full_name is a variable, not a function, thus you don't need to use () after it. Split however IS a function that accepts arguments so you need to do something like:
name_list = full_name.split(arguments)
It's your job to figure out the argument you need to put in split to figure out how to space it.
Let me know if you run into other issues!
Michelle Mangwiro
Courses Plus Student 467 PointsThanks