ExamBank Scot · N5 Computing Science question bank · All N5 Computing Science questions
3 marks · Selection and logical operators
A parking fine is £130. If this fine is paid within 14 days the fine is halved. A design for a program to calculate the fine depending on when it is paid is shown below. 1. Set fine to 130 2. Get number of days since fine was issued 3. Calculate and store fine Using a design technique of your choice, refine step 3 of the design.
• if with condition: days <=14 • calculation: fine/2 • assign calculated value to variable Also accept <14. If no calculation the third bullet can be awarded for variable = 65 If candidate shows a calculation do not award third bullet if they assign 65 to fine, ignoring their calculation Calculation may be done other ways but must always use ‘fine’ Other variable names may change