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 trialGil Kujawski
2,426 Pointsi dont understand what they are asking me in the second step/
the first step i did, but i dont understand how they want for me to write the second step.
// Enter your code below
let firstValue = 10
let secondValue = 30
let product = firstValue * secondValue
let output = "\(firstValue) * \(secondValue)"
2 Answers
Valentin Fedronic
Courses Plus Student 9,078 PointsHey Gil,
The issue is in your declaration for the constant output. Step 2 mentions the string that describes the operation should read: "The product of 10 times 30 is 300".
However, your current string for output is not using the product constant, and it reads: "10 * 30".
To complete this step, try to assign the correct string to the constant output:
let output = "The product of \(firstValue) times \(secondValue) is \(product)"
Hope this helps!
dan kujaneck
8,946 PointsChange
let output = "\(firstValue)*\(secondValue)" \\ "10*30"
To
let output ="\(firstValue*secondValue)" \\ "300"
dan kujaneck
8,946 Pointsdan kujaneck
8,946 PointsThis worked: // Enter your code below let firstValue = 11 let secondValue = 99 let output = "product = (firstValue*secondValue)"
Mr. Kujawski: I think (firstValue) and (secondValue) are Strings. So you are trying to multiply two Strings together which is illegal.