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

Where can I find the solution to the exercise I cannot complete? Bummer! is not very helpful.

This is a general question, I would like to know where I can find keys to exercises when I'm having difficulties completing them. Thank you.

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

let isGreater = someOperation  anotherOperation

2 Answers

andren
andren
28,558 Points

Sadly there isn't really any official way to see the solution of a challenge. You can often find the solution by googling the name of the challenge and looking at forum threads where others are asking for help, but beyond that there isn't really any way to find the solution other than asking for help like you are doing right now.

Anyway the problem with your solution is that you don't generally use combined symbols like "≥" (which are not found on standard keyboards) in programming like you do in algebra, in programming you combine separate symbols (which are found on standard keyboards), greater than or equal to is ">=" for example, less than or equal to is "<=" and so on.

So change "≥" to ">=" and you will be able to pass the challenge.

Thank you very much!