Formula / Deluge Script Help

Formula / Deluge Script Help

We are coming from another database program and need help with Creator Scripting.

On our form we have several YES/NO questions. If all questions are answered YES then the applicant is considered APPROVED. Therefore we would have a field populated as APPROVED or NOT APPROVED based on how the YES/NO questions are answered. We would also create a % APPROVED NUMBER field so if the APPLICANT only has 4 of 8 questions answered YES then they would be 50% APPROVED.

(1) I assume we need to use a FORMULA field on the form to calculate?  - or deluge script in a workflow?
(2) What would the formula/script look like?

Logic:
(A) If all questions = Yes then APPROVED field would show value of YES otherwise it would show NO
(B) % APPROVED value: Count Yes fields and divide by total number of questions

Thanks!