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

Devansh Sanghvi
PLUS
Devansh Sanghvi
Courses Plus Student 934 Points

Error in the Xcode showed me that the the statement was too complex to be solved in reasonable time,what does that mean?

Error in the Xcode showed me that the the statement was too complex to be solved in reasonable task,what does that mean? how should i solve it

types.swift
let firstValue=1
let secondValue=1

let product=firstValue*secondValue

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

2 Answers

Jhoan Arango
Jhoan Arango
14,575 Points

Hello:

You do not have to do the actual multiplication all over again in your output variable. There you should have a string with some string interpolation of what you've already done.

let firstValue = 2
let secondValue = 5

let product = firstValue * secondValue

let output = "The product of 2 times 5 is \(product)"