If your friend can't pass a take home quiz they are in real trouble. Even if you help them now, they will just crash and burn later. Might as well force them to do it themselves now.
Here's an old idea: a friend wouldn't ask you to help him cheat. A real friend would know you, would have some idea of what your values are and wouldn't even ask. You might think he's your friend but he thinks you're his passport to a higher grade. Friends don't take advantage of one another. Friends don't put a price on friendship, don't use friendship as a way to get favors done for them. Your "friend' is using you.