Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
whats 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"
Jennifer NordellTreehouse Teacher
Hi 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!