Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

// 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,631 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 :)