It's entirely over to you as question author how you allocate marks. In the script shown in earlier postings you'll see the line
mark = 1.0 if all_correct else 0
You should just change that to award marks on a per-field basis in whatever way you choose.