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 trialbebasdhungana
505 PointsBOT
BOT
1 Answer
Erik Nuber
20,629 PointsThe first step of this challenge is to use the remainder operator (%). Here's how you use it:
let result = value % divisor
The second part is to use the equality operator (==) to test if the result equals to 0. If result equals to 0, isPerfectMultiple will equal to True. Otherwise isPerfectMultiple will be equal to False.
let isPerfectMultiple = (result == 0)
I found this as an older answer from someone. I took the challenge and it worked.