I've been in the exact same boat as you, and it's no fun at all. It's always awkward when your friends ask you for work they know you've done but that you don't particularly want to share. First, let me be clear, you do not owe them your answers.
Yes, they're your friends, but it took you a lot of time and effort to finish that assignment. When your friends ask you for work you've already done, they're asking you to dip into your own time further so that they don't have to dip into theirs. Frankly, that's not very nice. Obviously if it's once in a while that's different, but it doesn't sound like that's the case. Here's what I did to reduce the number of requests.
1) Drag your heels. It's 8:00 on Thursday night and your assignment's due next morning. Just like clockwork, you get your weekly text, "Hey, are you finished with the ____ assignment?" Ugh, of course you are. You've always finished it by now. The problem is, your friends know this, and that makes you a guaranteed source.
The next time you get that text, don't answer it right away. Give it half an hour or so. Then once you answer and they text you back, wait again. The idea is to break the mindset that you're sitting there ready to help whenever they want you to. If you all of a sudden become a slow source of information, they may look for a faster one. Or even better, they might even solve a lot of their work on their own waiting for you to get back to them!
Just be sure not to apologize for responding slowly (I wouldn't even bring it up). If you give them the impression you're supposed to be getting back to them right away, they'll keep expecting it.
2) Ask them exactly what they're looking for. Most of the time, if I let my friends describe what they needed help with, they'd end up asking for the whole assignment. So I pretty quickly started asking for specifics. When they'd say "I need help with this assignment," instead of asking "what do you need help with?" I'd ask "which questions do you need help with?"
This forces them to describe up front what they expect from you, in a bit of detail too. Usually, I'd get "we're having trouble solving questions blah and blah." or something similar (if you find you're still being asked for most of the assignment, look at part 4).
When you're giving them arbitrary amounts of help, it's easy for them to say "oh, I'm also stuck on problem 4" after you've solved 1-3. Asking them to lay it all out upfront makes it much more awkward for them to tack another problem on. Don't forget you're only in this position because they're asking you something that's awkward to decline. Don't be afraid to put them in an awkward spot too.
3) Be less certain of your answers. Yeah, this one's a little underhanded. If I just simply didn't want to give an answer (if I worked particularly hard on it, or if they'd already asked me for too much), I'd tell them I wasn't sure about it. The more they pushed, the "more certain" I was it was probably wrong. This does 2 things.
First, it gives some natural sense of pushback against their request. Making up an excuse and using it over and over forces them to ask you repeatedly for your work. I've found it's already kind of awkward to ask in the first place; sometimes they'll just give up instead of ask 3 or 4 times.
Second, you can't pass off wrong work as your own. If I make a stupid math mistake and they make it too, someone plainly cheated. Telling them your answer's probably wrong translates to it being a higher risk answer. There's always a chance that means it's not worth it to them.
4) Don't be afraid to draw a line. This one's a little tough, but you're going to have to do it sometimes. Sometimes step 2 doesn't work. They'll answer "what problems do you need help with" with "I just don't understand this assignment at all," or something similar. At that point, it's ok to say "I can't just give you the whole thing!"
Hopefully, your friends know they're putting you in an awkward spot to begin with. Drawing a line helps remind them you're not completely comfortable with their request. It also helps remind them that you aren't going to give them every answer they ask for.
If they continued asking me for more than I was willing to help, I'd start dragging my heels a little more. Don't be afraid to hold your help a little hostage. I know it feels mean, but once they realize that being too demanding translates to no help, they'll hopefully start requesting help at a more reasonable rate. Often I'd wait a little while then get a text saying "ok, we've worked out most of them, but we still can't work out numers 11 or 16," which is a request I'm more than happy to help out with!