iOS Swift Basics Swift Types Recap: Swift Types

Kristen Cordes
Kristen Cordes
807 Points

interpolation

I feel like I'm really close, but just can't quite get it. Please help

// Enter your code below let firstValue: Int = 12 let secondValue: Int = 10 let product = firstValue * secondValue let output = "The product of (firstValue), times (secondValue),is (product)"

types.swift
// Enter your code below
let firstValue: Int = 12
let secondValue: Int = 10
let product = firstValue * secondValue
let output = "The product of \(firstValue),
times \(secondValue),is \(product)"

1 Answer

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 49,939 Points

If you are basing your code on this video @ 11:40 there are commas in the video because there are commas in the final string. In task 2 there are no commas. It should just be "The product of 12 times 10 is 120". You will also want to move this string to one line.

Kristen Cordes
Kristen Cordes
807 Points

Thank you!! After rewatching the videos a few times I did finally figure it out. Those darn commas were really messing me up. It is all about the syntax isn't it.?

Again....appreciate your help.