^ Yeah that's pretty much what I said. Of course, if the exercise isn't understanding how to do it, the built-in function is to be preferred.
Type: Posts; User: CT&SC
^ Yeah that's pretty much what I said. Of course, if the exercise isn't understanding how to do it, the built-in function is to be preferred.
Yeah, returning n % b is just going to give the remainder after division by b. Useful for converting bases, but not enough.
Think about it like this. A way to get a number's base ten...