My goal is to ensure they engage in practical coding after covering the theoretical aspects in class. I have tried several approaches, but the results have been not that good:
1. Explaining the importance of assignments and motivating students to attempt them.
2. Introducing a reward for assignment completion; for instance, offering a gift to those who attempt all the assignments.
3. Changing the reward from a physical gift to an Amazon voucher.
During my research on the topic, I came across the book "Why Don't Students Like to Go to School?" In that, the author suggests that the difficulty level of assignments should be just right—not too easy, not too hard. However, in my classes, students seem reluctant to attempt even simple problems. When I ask, they often respond with, "Sorry, I am not able to find time for it."
I would appreciate any suggestions for a more effective solution to this issue.
Clearly they're able to find time to come to class and tell you this, so if you think that completing the assignments is more important, you can flip the classroom https://en.wikipedia.org/wiki/Flipped_classroom and have them do practical coding during class while assigning reading material or videos covering the theoretical lectures as homework. (Which the students obviously won't be able to find time for.)
You are asking about extrinsic motivation - ie, how can you "make" them want to do the work
Extrinsic motivation only comes in 2 forms - positive (eg a passing grade, promised promotion, etc) or negative (ejection from the school, loss of job, etc)
Intrinsic motivation is entirely up to the "motivee" - if they do not "care", and you cannot "make" them care ... they will not do the work
You might tell them about the benefits to them later of doing this now (possibility for career advancement, opportunity to do X because they have learned Y, etc)
But what's the context - community college class with minimal-motivation HS graduates, or ???
"It is not enough that I succeed, other people must fail"