Welcome to the Treehouse Community
Looking to learn something new?
im having a trouble with the format of the string
this is what wrote: unity
let firstValue = 2 let secondValue = 4 let product = 2 * 4 let output = " \(firstValue) \(secondValue) \(product) "
MODERATOR EDIT: Added Markdown to post so the code is readable in the Community. Please refer to the Markdown Cheetsheat when posting to the Community for the proper markdown with code snippets.
Mazen Wasel1,256 Points
I think the problem is that challenge editor is expecting you to type:
let output = "The product of (firstValue) and (secondValue) is (product)"
let output = " (firstValue) (secondValue) (product) "
Hey Kong! when ever you are interpolating properties into a string like this you must use a \ before the () so for you this looks like:
let output = " \(firstValue) \(secondValue) \(product) "
Hope this helps let me know if you have questions!
I wonder if it's your keyboard?
Sorry buddy was working I have to be honest I have no clue why your \is not working
Laksakan Krishnapillai6,390 Points
I am having a problem on this question right now and I have formatted the string interpolation and I am not sure why it's incorrect.
Use this code: // Enter your code below let firstValue = 5 let secondValue = 6 let product = firstValue * secondValue let output = "The product of (firstValue) times (secondValue) is (product)"