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

Hi, don't really understand what you're asking I get this and giving me an error

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

operators.swift
// Enter your code below

let value = 200
let divisor = 5

let someOperation = 20 + 400 % 10 / 2 - 15
let anotherOperation = 52 * 27 % 200 / 2 + 5

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

2 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,858 Points

Hey JC,

You're on the right track. The first part of the Task you have is correct.

The second part, you are going the right way, you just need to take those two lines you have and make it into one. The second part of the challenge wants you to check the result and see if it is zero or not. So, you will be assigning the Boolean result to the constant isPerfectMultiple.

So, when we combine the two lines into on, we get:

let isPerfectMultiple = result == 0

Hope that helps and makes sense now. Keep Coding! :) :dizzy:

Thks Jason, appreciate