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

what's wrong with the code? // Task 2 - Enter your code below let isGreater = anotherOperation >= someOperation

// Task 2 - Enter your code below

let isGreater = anotherOperation >= someOperation

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
let isPerfectMultiple = result == 0

// Task 2 - Enter your code below

let isGreater = anotherOperation >= someOperation

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! You're so close! You've set up the constant just fine. It's the comparison that's a little off. They want you to return the result of someOperation greater than anotherOperation. Right now you're using greater than or equals and you've got the things you're comparing in the wrong order. Try reordering that and checking to see if it's greater than instead of greater than or equals. Hope these hints help! :sparkles: