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

Mathias Klitgaard
Mathias Klitgaard
724 Points

I don't get step two in this ?

Am I not getting the code right, or am I not understanding the task ?

types.swift
// Enter your code below

let firstValue = 10
let secondValue = 5
let product = 50
let output = "\(firstValue) * \(secondValue) = \(product)"

1 Answer

Richard Lu
Richard Lu
20,185 Points

Hey 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
Mathias Klitgaard
724 Points

Thank you Richard.

Wasn't aware that they ment it literally :)