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 trialboris said
3,607 PointsI don't know what to do
Am I meant to make to separate functions or am I meant to make one? I did what it asked and it still says it's not meeting the requirements.
func isDivisible(#dividend: Int, #divisor: Int) -> Bool {
if dividend % divisor == 0 {
return true
} else {
return false
}
}
func isNotDivisble(#dividend: Int, #divisor:Int) -> Bool {
var status = false
if dividend % divisor == 0 {
status = false
println("Is not divisble")
} else {
status = true
println("Is Divisble")
}
return status
}
isNotDivisble(dividend: 10, divisor: 2)
1 Answer
Raul Tammesalu
2,348 PointsSeems you might have a typo in function name: it should be isNotDivisible ( 4 x i ). Otherwise function looks correct.
Gabe Nadel
Treehouse Guest TeacherGabe Nadel
Treehouse Guest TeacherHey Boris,
In the future, if you can write a title that is more descriptive than "I don't know what to do" that would help future students discover your valuable question when they stumble and search for a similar solution.
Cheers and thanks for being apart of The Community!