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 trialDaulet Bakhbergenov
306 PointsWhat I am doing wrong?
Here is asking to combine. I don't understand please could anyone help
let name = "Daulet"
let greeting = "Hi there, "
let combination = greeting + name
let entropolatedCombination = "\(greeting) \(name)"
2 Answers
Alex Koumparos
Python Development Techdegree Student 36,887 PointsHi Daulet,
The challenge is telling you to set the constant greeting
to the value of "Hi there, " followed by (using interpolation) the value in name
.
You've demonstrated in your last line that you know how to use string interpolation, you just need to make sure that the result ends up in the right constant.
You should end up with just two lines:
- one declaring the constant
name
and assigning the value of your name to it (you already have this exactly right); - one declaring the constant greeting and combining (using interpolation) the string literal "Hi there, " and the contents of
name
.
Hope that helps
Cheers
Alex
harshil bhatt
Courses Plus Student 2,722 Pointslet name = "Daulet" let greeting = "Hi there, " let combination = "(greeting) +( name)"
let entropolatedCombination = combination
// This one is right