From the course: Python for Non-Programmers
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Solution: Is there a remainder? - Python Tutorial
From the course: Python for Non-Programmers
Solution: Is there a remainder?
- [Instructor] Congratulations on making it to your final CoderPad challenge. Now, in this challenge, I want you to make a function that tells you whether or not dividing two numbers results in some sort of remainder. So this function that should be called, has_remainder, should either return true if there is a remainder or false if there is not. So this is the one CoderPad challenge where the little test code at the bottom right does actually come into play. And this is because, now that you know about functions and parameters, this is something that could actually make sense to you. I didn't put those in the earlier challenges 'cause it was a little bit above our pay grade, but now you'll see how this comes into play. So let's go ahead and first just starting by running the test code, you'll notice the big thing that we're missing here, the big error that we get is it says we have no attribute has_remainder. We need to create that function first. So let's go ahead and make a new…