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 trialmark hengstebeck
1,119 PointsWith this task on Xcode, the error I am receiving is "an unterminated string literal". I do not understand.
let firstValue = 2 let secondValue = 3 let product = 2 * 3 let output = 6 let interpolatedOutput = "(firstValue) * (secondValue) = (product)”
// Enter your code below
let firstValue: Int = 2
let secondValue: Int = 3
2 Answers
Ollie King
10,194 PointsHi Mark,
You are very close. It looks like you have missed the \ (backslash) from the code when interpolating strings. Your code should look like this:
// Enter your code below
let firstValue = 2 let secondValue = 3 let product = firstValue * secondValue
let output = "The product of (firstValue) times (secondValue) is (product)"
Hope this helps? :)
mark hengstebeck
1,119 PointsThanks Ollie, That's it. My code should look like this: // Enter your code below let firstValue = 2 let secondValue = 3 let product = firstValue * secondValue let output = "The product of (firstValue) times (secondValue) is (product)" Thanks, Mark
Ollie King
10,194 PointsNo worries :)
Ollie King
10,194 PointsOllie King
10,194 PointsOk it's not showing the backslashes, but before every set of parenthesis () in the code put in a backslash.