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 Basics Swift Types Recap: Swift Types

string interpolation

Can someone help with step 2 please? thanks!

// Enter your code below
let firstValue = 42
let secondValue = 200

let product = a * b 8400
let output = "The product of 2 times 4 is 8"

1 Answer

Anthony Lafont
Anthony Lafont
17,075 Points

Hi Saikou,

In this challenge, they want you to use String Interpelation for the output so that, if you want to change one of the two firsts the constants, you don't have to change the output.

Here is the code =

let firstValue = 42
let secondValue = 200
let product = firstValue * secondValue

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