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 Operators Working With Operators

struggling with the answer

swift_lint.swift:13:11: error: consecutive statements on a line must be separated by ';' let result == 0

13:11 means what

thank you

1 Answer

Hi there,

You have

let result == 0

Which is partly correct. You have compared result to zero correctly. But you haven't assigned that into the constant called isPerfectMultiple.

// Task 1 - Enter your code below
let result = value % divisor
// Task 2 - Enter your code below
let isPerfectMultiple = result == 0

Your error was saying that you were trying to do two things; create a constant with the keyword let and compare result to zero. Or maybe you might have been creating a constant called result. The compiler couldn't tell what you were attempting, so it threw an error.

The solution is to create the constant called isPerfectMultiple (let isPerfectMultiple) and assign (=) to that the result of comparing result to zero (result == 0). That's the code above; let isPerfectMultiple = result == 0

I hope that helps.

Steve.