iOS Swift Basics Swift Operators Working With Operators

C McGowan
C McGowan
6,504 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
MOD
Michael Hulet
Treehouse Moderator 47,024 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,504 Points

Okay awesome thanks so much