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.
having trouble with the final exercise
when I click submit work it says my output is in the wrong format, can anyone help
let firstValue = 2 let secondValue = 4 let product = 2 * 4 let output = " \(firstValue) \(secondValue) \(product) "
You're outputting the 3 variables in a string but not in the format specified which is
"The product of 2 times 4 is 8"
Matt Skelton4,548 Points
You're very nearly there! Pay particularly close attention to this statement:
The string should read: "The product of 2 times 4 is 8"
You just need to tweak what you're displaying in your output. Your current output would print as follows:
" 2 4 8 "
You want the value of output to read as a grammatically correct statement. Once you add these details around your string interpolation, you'll be done. Hope that helps!
"The product of (firstValue) times (secondValue) is (product)"