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 trialMathias Klitgaard
724 PointsI don't get step two in this ?
Am I not getting the code right, or am I not understanding the task ?
// Enter your code below
let firstValue = 10
let secondValue = 5
let product = 50
let output = "\(firstValue) * \(secondValue) = \(product)"
1 Answer
Richard Lu
20,185 PointsHey Mathias,
It seems that the string does not match in your solution. The challenge requires you to have the constant output in a format like this:
"The product of 2 times 4 is 8"
Current, your output using the numbers above would be this:
2 * 4 = 8
In order to fix your solution, check this out:
let firstValue = 10
let secondValue = 5
let product = firstValue * secondValue // try to get into the habit of using the constants that you've declare and have them do the thinking
let output = "The product of \(firstValue) times \(secondValue) is \(product)"
Happy coding! Good luck :)
Mathias Klitgaard
724 PointsMathias Klitgaard
724 PointsThank you Richard.
Wasn't aware that they ment it literally :)