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 trial

iOS Swift 2.0 Basics Swift Types Recap: Swift Types

There is nothing wrong but it is saying its wrong.

I do not see anything wrong with my code but treehouse says its wrong i copied and pasted it onto Xcode and it runs fine on xCode

types.swift
// Enter your code below

let firstValue = 2
let secondValue = 4

let product = firstValue * secondValue
let output = "\("The product of") \(firstValue) \("times") \(secondValue) \("is") \(product)" 

2 Answers

Zachary Kaufman
Zachary Kaufman
1,463 Points

Haha sorry for whatever reason when I posted the answer it deleted the backslash here is the correct code

Let output = "The product of (firstValue) times (secondValue) is (product)"

When I post this for some reason all the back slashes will be deleted. Please have a backslash before every () and that should be the correct answer

Thank you !

Zachary Kaufman
Zachary Kaufman
1,463 Points

No problem good luck with your classes! :D have a good day

Zachary Kaufman
Zachary Kaufman
1,463 Points

Don't have () around The product of and around times and around is. I think that will let it pass. Having () around everything in strings looks choppy and unorganized which is why the grader is counting it wrong even though technically it is correct. I hope this helps good luck with your classes!

I proceeded to do so, but it still won't let me pass, I wonder what the problem is :(

Zachary Kaufman
Zachary Kaufman
1,463 Points

Would you mind sending me your updated code?

// Enter your code below let firstValue = 2 let secondValue = 4

let product = firstValue * secondValue let output = " \"The product of" (firstValue) \"times" (secondValue) \"is" (product) "

sure here, like you said i took out the (), around the strings