I think a good way to deal with this would be assignments that also (partly) prepare you for the written exam. So if you sit down and do it yourself and actually understand the assignment you already did some learning for the exam.
I had one course at university with homework assignments that were super tough. I did it all by myself but in the end I learned so much that I didn't even need to study for the written exam and got a top grade. Others who did not do their assignments on their own had to study hard for the written exam and in most cases got way worse grades or failed.