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

Riley Heckaman
Riley Heckaman
807 Points

I'm struggling to code the product/output question, if 1stvalue and 2nd value = 7 and 13, what is product and output?

let firstValue = 7 let secondValue = 13 let product = 91 let output = ( (firstValue) * (secondValue))

types.swift
let firstValue = 7
let secondValue = 13
let product = 91
let output = ( \(firstValue) * \(secondValue) )

2 Answers

Reed Carson
Reed Carson
8,306 Points

youre almost there. instead of hardcoding "product" as 91, use what you did in output. then in output just use interpolation to print the sentence its looking for.

Riley Heckaman
Riley Heckaman
807 Points

It asks to print the string "The product of 7 times 13 is 91"

but that isn't working when I type:

let output = "The product of 7 times 13 is 91"

I believe this is incorrect because constants don't require the "", no?

Riley Heckaman
Riley Heckaman
807 Points

Status: COMPLETE #gotit :)