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 trialronald james
Courses Plus Student 129 Pointswhats the error in my code and how is it supposed to be?
what is the error in my code?
let firstValue = 10
let secondValue = 20
let product = 200
let output = " \(firstValue) * \(secondValue) is product"
1 Answer
Jennifer Nordell
Treehouse TeacherHi there! It looks like you're doing pretty well and understanding interpolation, but your string doesn't match what they want. Currently, the constant output
would hold this string: "10 * 20 is product". But they want your string to look like this: "The product of 10 times 20 is 200". You also are forgetting to interpolate \(product)
like you did with your first two variables. Once you fix the formatting of the string, you should pass.
Hope this helps!