iOS Swift Basics Swift Types Recap: Swift Types

Albrino Fernando
Albrino Fernando
1,087 Points

Format Not Right?

For some reason when I put in my code, it tells me to check my format, but I'm 100% that i got the right format for my constant output. Here's my code, what did I do wrong?

// Enter your code below let firstValue = 32 let secondValue = 12 let product = firstValue * secondValue let output = "(firstValue),(secondValue),(product)"

types.swift
// Enter your code below
let firstValue = 32
let secondValue = 12
let product = firstValue * secondValue
let output = "\(firstValue),\(secondValue),\(product)"

1 Answer

Magnus Hållberg
Magnus Hållberg
16,953 Points

There is nothing wrong in your code, its just that the challenge expects you to include the exact text for the string, like this.

// Enter your code below
let firstValue = 32
let secondValue = 12
let product = firstValue * secondValue
let output = "The product of \(firstValue) times \(secondValue) is \(product)"