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!

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

C McGowan
C McGowan
6,866 Points

Did I really get this right? I was looking at this in XCode isGreater = someOperation >= anotherOperation

I was looking at this in XCode and didnt get a a result, but the test accepted it. Let me know if im being crazy

let value = 200
let divisor = 5

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

let result: Int = value % divisor

let isPerfectMultiple = result == 0

let isGreater = someOperation >= anotherOperation

1 Answer

Michael Hulet
Michael Hulet
47,909 Points

Yes, your code is exactly right. It sounds like you may've been testing in a playground, which are notoriously slow/unstable/buggy, but your code does exactly what the challenge asks. Great job!

C McGowan
C McGowan
6,866 Points

Okay awesome thanks so much