N5 Paper, Q19 BIII

  • Ronnie Ross

    Hi all,


    I was going through the N5 paper, thought I would attempt it in order to see how it was, pretty good paper in my opinion.  However, I am utterly stumped on Q19, part B, part III.  The question has some pseudocode, which is totaling the values in an array (5 elements).  The question in particular states that an additional value has been added, however the output remains the same.  It asks why this is.  I cannot work it out.  My initial thought was that the fixed loop would still only iterate 5 times, and therefore not detect the 6th value entered.  However the loop is written as “FOR EACH cost FROM all costs DUE“, not “FOR count=1 to 5 / FOR COUNT=0 to 4“, therefore this loop would iterate for each cost in the loop, therefore detecting the 6th cost added.


    I am being really dense here, I don’t see the issue.  Is the word “DUE” anything to do with it?  I have never encountered this term before in relation to programming.


    Thanks in advance.


    I noticed this too and I agree – it doesn’t make sense. I wondered if the pseudocoderef language/Haggis is wrong.

    From the Reference Language document there are 2 types of fixed loops
    “♦ FOR id FROM expr TO expr DO command END FOR
    ♦ FOR EACH id FROM expression DO command END FOR EACH
    ― expression returns a structured value – an ARRAY or STRING
    ― the order of value extraction from the structured value is first to last”

    If the FOR loop in question 19 were the FOR..FROM..DO..END FOR example then the question works, but it was the FOR EACH that was used. I think the word DUE is typo, should be DO.

    Did you also notice the quote marks on line 6? It makes the line look very odd.

    How did this get past the proof readers?


    Question 4 also has a typo.
    Also, in Q20, Sue’s laptop weighs 65kg!!!

    Cannot think of an answer for that question. It is as if it had a fixed loop counter set to 4 but in the code it doesn’t…. Aargh!


    Q20 It’s not even a laptop! It is a “tablet PC” – heavier than me! I’ve been trying to workout what precious metals could possible weigh that much given the dimensions.

    p keane

    Does q21d “Error detection and correction in a program is easier if the code is readable” not answer q2 “Explain why it is important that program code is readable.”?



    Q3: Doesn’t make any sense as there are database applications that do sit in ROM on devices because of how they are used. The question should have been “Q3. Explain why it may not be appropriate to store a database in ROM memory.”

    Q4: Typo “Give one reason of using this type of selection”.  Even if it had been correctly worded, the question would have been better phrased as “Give one reason for using this user interface to collect user input.”

    Q5: multiple possible answers.  To hold data values while processing, to hold memory address, to hold instructions, to hold the result of calculations etc.

    Q6: Possible answers: encryption software, anti-malware, anti-spyware, performance optimisation tools, digital signing tools, back-up tools, firewall, child safety package. These are all bundled with different suites. I’m sure there are more possible answers.

    Q10.  I’m guessing we are looking for “query”. Is “search” acceptable?

    Q11. Being pedantic (a bit) the first response could be either interpreter or compiler. When interpreted code comes across an error, translation stops and the error is reported (just as described).

    Q14. I’ve a NAS box at home. It is centralised storage for my internal peer-to-peer network. *sigh* We really need to update our definitions/descriptions.

    Q16. Question jumps from talking about “the pupil” to “the user”. Q16(b) should have been “When the pupil enters his/her answer”.  Not grammatically correct to use “their”.

    Q18(b) Is it me or is there something odd in the wording of the News article?

    Line 3 of Q19 must be typo

    FOR EACH cost FROM all costs DUE

    because 19(b) states that her program works perfectly.  19(b)(iii) has me completely stumped. The loop in the program is a FOR EACH and hence the additional item in the array/list WILL be processed and the correct value 233.50 would be calculated. This means that 19(b)(iii) (2 marks) are unanswerable.

    20. A 65 kg tablet PC, goodness!

    201b) Line 4 is not indented and there is no closing END IF (no Line 5). What is the solution?

    IF numPlayers = Yes AND numGames = YES THEN?

    The question asks candidates to implement code for the flow chart section displayed.  numPlayers has nothing to do with implementing the section of the design shown. The question is incorrect!

    I am really disappointed to see this many issues in an SQA paper. Knowing very well the procedures that go into producing these papers I find it almost unbelievable that so many mistakes and poorly worded questions got past vetters and item writers.





    lynn donald

    Hi all. First of all, before I start…. If anyone on here were involved in the writing and checking of the 2016 National 5 paper, please do not take what I am going to say personally.

    I usually do not get involved in “fights” over the SQA. However, I am very disappointed with the quality of this paper overall and personally, I think this paper is a disgrace and am really wondering if it actually went out to any checkers.

    I have went through the entire paper and although some of my points are probably a little pedantic, they are valid. I also would like to encourage as many teachers as possible to contact the SQA this week to express their concerns. So here goes:

    Q12 – 2 marks available
    This question does not ask candidates to “write the most efficient code which will take in each runner’s time for the marathon” and therefore we hope that candidates will not be penalised if they give 16 separate input lines as opposed to a fixed loop.

    Q15d – 1 mark available
    This question expects the candidates to look more than half way down the list of Aircraft Codes to realise that a text field would be required. This seems unfair, especially as there are only 3 text examples out of the 9 shown. The text should have been made more obvious.

    Q15eii – 2 marks available
    The question does not state how many of each type of test data to give. We hope that 1 example of each is enough as the question is worth 2 marks (1 for each). However, the question states “… to show suitable data values….”, “…values…” is ambiguous.

    The scenario to this question is very difficult to understand.
    It swaps between both a user and a pupil (confusing).

    Q16a – 4 marks
    Part a involves more than half a page of reading before the actual question. The full scenario isn’t needed for part (a) of this question, this overly complicates the actual question for the candidate and makes the actual question far more difficult than it actually is.

    Q16c – 1 mark
    The question asks the candidate to “State the output from the program”, giving the indication that there is only 1 output. However, there are 3 outputs from the design shown:
    • 10 would be displayed on screen
    • “Correct it is in the middle” is displayed on screen
    • Incorrect message would then be displayed
    There also appears to be an error in the design. Line 18 states that an incorrect message will be displayed but there is no condition around this line. This will cause confusion with the above outputs.

    Q17a – 1 mark
    The question asks the candidate “What type of navigation structure is required for the website?”
    CAS document only states “Navigation” – there is no mention of “types of Navigation” – this question should not have been asked. How were teachers to know they had to teach particular names for types of navigation? And what names were me meant to teach? Not sure what they are looking for here – could it be hierarchical?

    Q17b – 1 mark
    Again, not actually stated in CAS documents: “good design to aid navigation, usability and accessibility”. There is no mention at National 5 level, that candidates have to know the term “wire-frame”. This however, would have been an easy questions for the candidates who had completed “Games Review” assignment but not for others.

    Q1b8 – 1 mark
    This question requires the candidate to read the “News” story. This sentence does not read well, it should have been split into several sentences or at least split with comma’s.

    Q18c – 1 mark
    Question requires knowledge as to what “cloned his neighbour’s phone” means. Cloning is not in CAS documents and therefore should not be directly questioned. Cloning is not a common example from Communications Act. I personally do not know what actually is involved in cloning and therefore cannot possibly know what law has been broken. This question requires knowledge outside the course. Perhaps, if “cloning” had been explained, then question would have been fair. From searching on Google, it would appear, that the answer should be “Communications Act”, however, if they are copying software, then could it be “Copyright, Designs and Patents Act”, also if they are copying personal details such as a contacts list, it could be “Data Protection Act”, and then again, did they hack the password, in which case “Computer Misuse Act”. So therefore, any law which the candidates have learned about will/should be accepted.

    Q18dii – 2 marks
    Not sure if question requires the candidate to write in the words or the actual “correct answer” in their response, it would have been helpful if this had been clarified in question. Makes for further confusion for candidates. Would expect both answers to be accepted as correct:
    If response=correct_answer then total =total+ 1
    If response= “A” then total =total + 1

    This question is set round an algorithm that is totally incorrect. All code used in exam papers is meant to have “passed” the Haggis checker at the current year’s version. This code appears to use a combination of both the 2014 and 2015 Haggis. This example does not pass any of the checks (either 2014 or 2015). Errors include:
    • Line 1 Sets total to 0 – this should be DECLARE total INITIALLY 0.00. 0 has to be set to ‘real’ number as it is later used to add to the ‘real’ values stored in all costs. Haggis will not allow the addition of two different variable types. If the candidate truly knows “Haggis”, they will know that the total being set as an integer (total=0) and the costs being set as real [35.00…], cannot actually be added together and therefore the total cost will not be calculated and the program will not be executed.
    • Line 3 uses an INCORRECT term of DUE, this should be DO
    • Line 6 attempts to use concatenation, however Haggis 2015 will not accept this either as “array concatenation requires two array types “

    Q19a – 2 marks
    This question only asks for the data structure which is an array. I am presuming that 2 marks mean that the candidate should be giving its type as well but this is not asked for. Candidates should not be penalised if the type is not given.

    Q19bi – 3 marks
    For the candidate truly knows “Haggis”, they could write down that the total will not be calculated due to the two different variable types causing an error. These candidates should not be penalised for this.

    Q19bii – 2marks
    There are many answers that a candidate could write here. This question is not clear as to what is being asked. Candidates might explain floating point representation using mantissa and exponent” or they could easily try to explain, the use of the data and address bus to send data to memory. Again, they should not be penalised due to the question requiring clarity.

    Q19biii – 2marks
    This question is WRONG!!!
    The output would not be 188.50 as the question states, the code would calculate the new total of 233.5. But then again, it wouldn’t due to the fact that it is trying to add real and integer.
    The loop in the question is: “For each cost from all costs due”
    First of all, there is an error in the wording of “due”, this should be “DO”.
    However, the loop will loop round all values in the array structure as it does not have a definite end point, for example “For each cost from 1 to 5”.
    The answer expected is obviously change the terminating value to 6 to include the new value of 45.00, however, the original terminating value is fine.
    How are candidates meant to answer this, especially, if they are really understanding the code given? Candidates should not be penalised for leaving this blank.
    I checked a “corrected 2015” version of the code (with the 5 nos) with the Haggis Checker, and it did calculate the 188.50. I then added in the extra value from part biii, and it calculated the new total correctly without any further changes.
    The code should have read:

    DECLARE total INITIALLY 0.00
    DECLARE allcosts INITIALLY [35.00,36.00,40.00,35.00,42.50]
    FOR EACH cost FROM allcosts DO
    SET total TO total + cost

    Q20cii – 1 mark
    The question asks the candidate to identify one interface type on the tablet shown. The interface presumably shown is “USB 3”. However, there is no USB 3 interface, it is commonly referred to as USB 3.0. Again, confusion for the best candidates.

    Q20civ – 2 marks
    Question asks for two reasons why app is incompatible with Sue’s tablet.
    Operating system answer is obvious and fine.
    However, I am presuming examiners are expecting “Backing Storage is too small – 16 GB should be min of 32Gb”, however:
    There are a mix up in units of backing storage: App refers to Gigabits (Gb) and Tablet refers to Gigabytes (GB). “Gb normally refers to Gigabits” – “GB normally refers to Gigabytes”. Therefore app actually requires 32/8 = 4GB and therefore the backing storage of the tablet (16GB) would be fine.
    The table also apparently weighs 65kg. This is more than 3 times my allocated luggage weight for my holidays. Seriously??? Is this a reason for incompatibility????
    Really, candidates can’t get 2 different reasons for incompatibility. Again, penalising the “good candidates” who will notice these things.

    Q21b – 3 marks
    The question refers to “…this section of the design”. The section shown in this part of the question only refers to “number of games” and does not match up to the line of code the candidate is expected to write which includes “number of players”, which comes from the previous page. Candidates are expected to write something that is not relevant to “this section of the design” as the answer from “this section of the design” cannot be fitted into slots given
    Various answers could include:
    IF numPlayers <=4 and numGames <=3 Then (from reading the scenario at start of question)
    IF numPlayers =”Yes” and numGames =”Yes” Then (from the original flow chart)

    Q21ci – 3 marks
    Test data has already been asked about in Q15eii. Q15eii states the two terms “Exceptional” and “Extreme” which could then be used to help candidates with this question.
    The 3rd row of the table is confusing as it shows both Exceptional and Extreme – What are candidates meant to write here? numPlayers is Exceptional but numGames is extreme? However, this data could not be entered as it stands, as numPlayers of 6 would be rejected and “Not valid no of players” would be displayed and the loop would be repeated, so would require an extra value fo rnumPlayers.
    Again, this is another confusing question for the “better” candidate. Especially, if they fully understand what is actually going on.

    Shirley Lemmon

    Thank you Charlie….I thought I was going mad!

    Question 21 (b) asks candidates to implement the design so I was assuming that the answer they were looking for is numPlayers should be less than or equal to 4 and the numGames should be less than or equal to 3, but as the validation for the numPlayers would already have taken place prior to the input of the numGames I would agree that this should not have been included here. Very confusing for the candidates!

    Ronnie Ross

    Going back over the paper, and reading some of these responses, it seems I was a bit hasty in claiming the paper to be “pretty good”.  I am also pleased that I was not simply being dense when it came to the question in the title.  I didn’t want to jump to conclusions (of course, the thought that the question contained an error was in my mind) before getting other opinions (as the possibility of me just being dense is a very real one!).


    Lynn, well spotted with the data types, I didn’t pick up on total being an integer.

    I also was confused with the phone cloning question.  I only had a chance to speak to one pupil after the exam, and she decided to go with copyright designs and patents, and I was just unsure.  Lynn, you are correct, you could argue for any of the 4 laws to be applied here.  In the end I went for Computer Misuse, as they have unauthorised access now to the phone and its files.  If the SQA only accept 1 correct answer here, I think that will be amazingly harsh.


    Enrico Vanni

    Oh no – its him again!

    The point was made in the ‘Higher Update’ thread by several contributors that it is now a depressingly predictable feature of ALL output from SQA with respect to Computing Science that it will contain errors and demonstrate poor quality control.  This paper continues that embarrassing trend and represents a new low in terms of quality.  In the past we’ve had questions repeated multiple times in papers and answers to one question given away in the blurb of others.  This paper has both of those, but in addition has questions that cannot be answered, sloppy program code that relates poorly to the questions that reference it and much much more that many have already identified.

    Surely this is has to be the final straw?  Or will the thin-skinned SQA apparatchiks deflect and defend this on the basis that it doesn’t matter as it’ll all be balanced out by adjusting the pass-marks and grade boundaries.  Don’t bother doing a good job as the process allows for mistakes to be absolved at the other end?

    The soft-soaping has to end.  Someone or some group just are not doing their job properly.  Whoever they are accountable to now needs to sort this out.

    Michael Conlon

    Regarding the N5 paper pupils sat on Friday I would have to say we have really let them down in terms of the robustness of the paper. We need to think more about what it does to their confidence when you get questions like 18(c) asking about cloning, a topic not in the course as I understand it and not something kids will pick up from general knowledge. so we are penalising them for lack of vocabulary – great. Even if it was decided that any act will be accepted that doesn’t help those who left it blank because they didn’t know what cloning meant.
    What does it do to your confidence when a question(19) tells you that the output is still 188.5 and you try and try to think of way that it could be and then decide you just aren’t capable and that your instincts are wrong? You then take on the rest of the paper with that lurking in your subconscious.
    Two questions on Extreme/Normal/Exceptional, the answer to question 2 in question 21d, the answer to question 6 in question 20d, a 65kg laptop, the word DUE in a FOR loop…..
    It is simply not robust enough and next year going through it as a past paper I’ll have to go through all these issues with the kids which dents their confidence in the papers they will be sitting, so that when they sit their Nat 5 exam they’ll be on the lookout for scenarios they’ve never heard of, the answer to some questions in others and statements which they cannot challenge as being wrong. I don’t want them spending their time doing that, I don’t want that to be the skill they develop.

    I feel for whoever set this up as they were not supported properly to ensure the robustness and clarity of the paper. That process needs to be looked at. In the meantime SQA need support in making sensible decisions about how to mark and exclude some questions. They need to respond to all of the issues being raised to give us confidence in their ability to deliver assessment which is fair.

    Joe Kane

    Hi everyone,

    I have been away over the weekend and have not had a chance to see the N5 paper. Does anyone out there have a PDF version of the question paper?



    John Schofield

    Qu 19.
    Line 3 – ‘For each cost’. Although this is in Haggis, I feel that this way of writing a ‘for’ loop is very confusing to pupils and think it is extremely unlikely that any of us would write an array and loop in Pseudocode in this manner, as unless this specific part of Haggis has been taught, pupils may think that ‘cost’ is actually the loop counter. Why overcomplicate matters?

    Compare with the Higher Qu 13, where the array ‘list’ is declared on a separate line, the ‘for’ loop is very clear and the array is referred to using the notation list[counter]. Would it not be possible to have consistency of writing Haggis between the two papers?

    Should the variable “all costs” not be written as either allCosts or all_costs for clarity? This is how I would expect students to write variable names, even in Haggis.

    Qu 19(c)
    Concatenation – this does not seem to be in the 2016 exam CAS, however it is in the 2017 CAS. It is in the Haggis reference document – but surely this can not be an examinable word until 2017.

    I don’t feel we can use any part of this paper as practice for the 2017 exam and am unfortunately going to express this opinion to the SQA.

    Enrico Vanni

    @John Schofield – interesting points Re. SQA Reference Language (to give it its correct title!)  I’ve made the point since day 1 of the new National Courses that Haggis/Scottish Pseudocode/SQA Reference Language is living in some limbo where it is neither ‘in’ nor ‘out’ of the course (but definitely in the exam for the purpose of setting program interpretation questions – I say to my classes that it exists to equally disadvantage every student as it is a language no-one can actually write practical programs in), leading to a raft of problems with how it is applied.  Even Quintin Cutts has been critical of how it has been used inconsistently and incorrectly in past exam papers (anyone attending Plan C events will have heard or read his comments) and I am sure he will have experienced deja vu with this latest mess.

    Coinneach Combe

    Thank you all for sharing your analysis of the many issues with the paper. I spoke to some of my pupils as they left the exam on Friday and discussion was mainly about question 19 b iii being impossible to answer and also question 18 c. Regarding that question the only answer I felt able to give to them was that The Data Protection Act wouldn’t apply as my understanding is it only applies to organisations, unlike individuals such as the man in the article.

    I will be contacting the SQA with my concerns after my return to school tomorrow.

Viewing 15 posts - 1 through 15 (of 41 total)

You must be logged in to reply to this topic.