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
Nischal shrestha189 Points
I didn`t understood challenge task
I did`t got what the question is asking for
// Enter your code below let value = 200 let divisor = 5 let someOperation:bool = 20 + 400 % 10 / 2 - 15 let anotherOperation:bool = 52 * 27 % 200 / 2 + 5 // Task 1 - Enter your code below let result = 200%5 // Task 2 - Enter your code below let isPerfectMultiple = result == 0 let isGreater = someOperation ≥ anotherOperation
Jason AndersTreehouse Moderator 145,853 Points
You've pretty much got it, there are just a couple of minor things.
First, you altered some of the preloaded code, and the instructions did not tell you to do so, and that will cause an error. You added
:bool to two of the predefined constants. That will need to be deleted and the preloaded code restored back to the original code.
Second, you seem to be using a symbol I've never seen before in coding... I'm not even sure how to recreate it. In your last line of code, the code is correct, but the symbol for
greater than or equal to is
While what you have is technically a symbol for that, it will not be recognized by any code editor, so you will need to use the two characters
> and = together.
Fix those up and everything else looks good! :)
Vardhan Agrawal2,425 Points
You're getting the hang of it! In Task 1, you were supposed to create a constant called isDivisible and assign it to a value with the boolean value of whether the value and the divisor is divisible. Also, as Jason said, you may have played around with the code that was provided for you in the challenge.
For the 1st task, add this line:
let isDivisible = result == 0
I hope this helps! Good luck with the rest of the course!