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

can you give me the answer for both of the tasks thx for your time :))))))))))))))))))))))))))))))))))))))))

thx for ur time if answer my question thx

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 = 
// Task 2 - Enter your code below
Jason Anders
Jason Anders
Treehouse Moderator 145,858 Points

Hi Rico Petrini,

"Giving" the answers in not the way the Treehouse Community is meant to work. If you're stuck on a challenge, and after reviewing the videos, still can't get it, you can post the code you are trying, and we will help you troubleshoot the errors.

I'll give you a few hints here: Task one will need to use the modulo operator, which is % and Task two will be assigning a comparison result to a variable. You check something with == and assign with =

Give it another go with these hints. Maybe review the videos too, as what is needed for this challenge is explained pretty well. If your still stuck, post back with the code you have tried and the errors you are receiving.

Jason ~Community Moderator :dizzy:

1 Answer

thx Jason for the hints because of you I finished the challenge :)