iOS Swift Basics Swift Types Recap: Swift Types

whats the error in my code and how is it supposed to be?

what is the error in my code?

types.swift
let firstValue = 10
let secondValue = 20 
let product = 200
let output = " \(firstValue) * \(secondValue) is product"

1 Answer

Jennifer Nordell
STAFF
Jennifer Nordell
Treehouse Staff

Hi there! It looks like you're doing pretty well and understanding interpolation, but your string doesn't match what they want. Currently, the constant output would hold this string: "10 * 20 is product". But they want your string to look like this: "The product of 10 times 20 is 200". You also are forgetting to interpolate \(product) like you did with your first two variables. Once you fix the formatting of the string, you should pass.

Hope this helps! :sparkles: