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!
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 trial
Abdullah TharwatCourses Plus Student 192 Points
I'm stuck here
I can't declare an interpolated string to be at the end " the product of 2 times 4 is 8 " firstValue = 2 secondValue = 4 product = 8
// Enter your code below let firstValue : Int = 2 let secondValue : Int = 4 let product : firstValue * secondValue = 8 let firstly = "the product of" let output = "\(firstly), \(firstValue) * (secondValue) \(product)"
Jhoan Arango14,575 Points
There are a few small mistakes in your code.. let's fix them.
On the "product" constant, you are not declaring anything there. The syntax is incorrect.
/// Lets do something like this let product: Int = firstValue * secondValue
Remember, that when you do a declaration, you do not need to explicitly show the type you are declaring, the system will infer it for you, unless its ambiguous and it must be declared.
/// Instead you can do something like this let product = firstValue * secondValue
Now, your output should look exactly as the requirement asks you.. including spelling, otherwise the system will not accept the answer.
/// Output with string interpolation let output = "The product of \(firstValue) times \(secondValue) is \(product)"
I hope this helps you solve your problem.