System: You are ChatGPT, a large language model trained by OpenAI.
User: I will send you a body of text, I will then state what you do next.
User: 7 Data structures and abstract data types507Data structures and abstract data types INTRODUCTIONThere is a difference between what is required for AS and A level here and this chapter has been split accordingly. AS-level students need only study to the end of the section on binary ﬁ  les. A-level students need to be aware of a much wider range of data structures  and abstract data types and als o understand how to implement them in a programming language: •Chapters 7–11 explain the data structures required for A level,including coding on how to implement them. •Chapters 12–16 cover some common algorithms required for A level,including how to implement the abstract data types described in Chapters 7–11.In Chapter 1 we looked at the different ways individual items of data might be stored. For example, we looked at storing a person’s age as an integer and their name as a string. These are known as data types. In this chapter we will look at the ways of storing larger volumes of data in formats that make it easy for programs and users to access and analyse. These are called data structures and abstract data types.LEARNING OBJECTIVES In this chapter you will learn: •what data structures and abstract data types are •what an array is and how to use one to store and access data•what a ﬁ  le is and how it is used to store data •the difference between text ﬁ  les and binary ﬁ  les•how to read and write data to and from csv and binary ﬁ  les.A- level students will learn: •what static and dynamic data structures are•the different characteristics of static and dynamic data structures.SPECIFICATION COVERAGE 3.2.1.1 Data structures3.2.1.2 Single- and multi-dimensional arrays (or equivalent)3.2.1.3 Fields, records and ﬁ  les 3.2.1.4 Abstract data types/data structuresKEYWORDS Data structure: a common format for storing large volumes of related data, which is an  implementation of an abstract data type.
 Abstract data type: a conceptual model of ho w data can be stored and the operations that can be carried out on the data.51ARRAYS ●Data structure and abstract data typeA data structure is any method used to store data in an organised and accessible format. Data structures normally contain data that are relatedand the way that the data are organised enables different programs tomanipulate them in different ways. Different data structures tend to lendthemselves to different types of applications. For example, a text filemay be s uitable for a database whereas a stack is suitable for handlingexceptions.An abstract data type is a conceptual model of how the data are stored and the operations that can be performed upon them. The data structure is animplementation of this in a particular programming language. ●ArraysWe came across the concept of an array  in Chapter 1. An array is a list or table of data that has a variable name that identifies the list or table. Each item in the table is called an element. An array can have many dimensionsbut most arrays are either one-dimensional in which case they form a list orcan be visualised as a two-dimensional table.
 Lists and arrays are static data structures that are created by theprogrammer to store tables of data. In some programming languagesprogrammers need to define just how big an array is going to be at the startof their program. This means that the size of the array and the amount ofmemory put aside for it does not change. You might find that you want to store a sequence of data in some way. Forexample you might want to store the names of pupils in a class: Name1 = "Derrick"Name2 = "Peter"Name3 = "Jill"Name4 = "Lynn"Carrying out any sort of work even on just these four names is going to bevery cumbersome. Imagine how difficult this would be if you wanted tostore 30 names or 3000 names. The best solution to this problem is to usean array. In the example above, we could call the array StudentName . Each element of the array can now be accessed using its position. Forexample, the third element in the array is Jill (assuming indexing starts at 1and not 0). This would be shown as: StudentName(3) = "Jill"Another example could be to set up a one-dimensional array called DaysInMonth . The third element would be set to 31 as that is the numberof days in March. As this table contains just one row of data it could also bedescribed as a list.
 Element in DaysInMonthContents of that element131228331430531630731831930103111301231 Figure 7.1 A one-dimensional array or listKEYWORDFile: a collection of related data. KEYWORDArray: a set of related data items stored under a single identifier. Can work on one or more dimensions.52 7 Data structures and abstract data typesAn array has one or more dimensions – for example you might want to store the mock exam results of a group of pupils. The array then might be called Results  and it would have two dimensions, one for the pupils and the other for the subjects and might look something like this: 1 23 451 2 3 4 5 6 7 54 67 76 65 75 32 1932 45 98 32 53 59 95 2671 12 32 54 5632 2147 65 12 4335 9922 1614 882 41 15 Figure 7.2 A two-dimensional arrayYou will note that the rows/columns are not labelled – it is up to the programmer to remember which axis refers to the pupil and which to the subject. In this diagram the 65 might represent the mark obtained by Hilary in the French exam. If the table were called Results  then Hilary’s French mark would be stored in Results(4, 1)  where the 4 identifies the pupil and the 1 identifies the subject.It is possible to work with multi-dimensional arrays. If you take the mock  exam paper array further, you might decide to store the exam results for each exam paper. In this case the value in Results(4, 1, 2)  could store the mark Hilary got in the second paper of the French exam. In fact you can have many more dimensions than this – a four-dimensional array might store the marks gained for each question in each paper, so Results(4, 1, 2, 12)  might store the mark Hilary was given for question 12 in paper 2 of the French mocks. As you add more and more dimensions to the array it becomes increasingly difficult to conceptualise.
 ●FilesYou will already be familiar with the concept of a file to store data. Thereare hundreds of different file types, all of which have their own structuredepending on the specific use of the file. Some files are very specific in thatthey can only be used on certain applications. Many file formats howeverare portable, which means they can be used in a wide range of programs.Two common portable formats that can be used when programming aretext files  and binary files .A text f ile is one that simply contains lines of text or other human-readable characters, where each line is usually referred to as a record . There may bediff erent items of data stored and these are referred to as fields .
 They m ay contain a header, which explains the content and structure of the file and an end of file (EOF) marker so that the programs using the fileknow when to stop. Common text file formats include txt used for non-formatted or plain text and csv (comma separated variables), both of whichare used for transferring data between programs.
 All files have an internal structure. For example, a csv file has fields thatare split up using commas. Most text files are delimited like this in someway so that when the file is being used, the program knows where to lookfor each item of data in the file. The following examples show a typicalKEYWORDS Text file: a file that contains human-re adable characters.
 Binary  file: stores data as sequences of 0s and 1s. Record: one line of a text file. Field: an item of data.FILES53structure where each row represents a record and the fields are separated either by tabs or commas: A tab-delimited text (txt) file: John Smith 22 Acacia Avenue LE11 1AAMary Jones 1 High Street LE12 5BDImran Siddiqi 12 Harrow Road LE13 1GGYin Li 24 Royal Road LE1 1AAA comma separate variable (csv): John,Smith,22 Acacia Avenue,LE11 1AAMary,Jones,1 High Street,LE12 5BDImran,Siddiqi,12 Harrow Road,LE13 1GGYin,Li,24 Royal Road,LE1 1AAThe two main actions you might want to carry out when working with text  files are: ●to write data from the program into a text file●to read data into the program from a text file. The following extract of Visual Basic-based code shows how you would write data to a text file. In this case, data is being written from a two-dimensional array called ArrayStore: FileOpen(1, "NewTable.csv", OpenMode.Output)‘ look at each row/record in turnFor RecordCount = 1 to 30  ‘ load first field from the next record into  the temporary stringRecordString = ArrayStore(recordcount,1)  ‘ concatenate all the other fields For FieldCount = 2 To 4     Recordstring = recordstring & "," & Arraystore (Recordcount,fieldcount)  Next ‘ write ‘record’ to file     Print(1, OutputString)NextFileClose(1)The following extract of code shows how you would read data from a text file into a program using Visual Basic as an example: ‘load csv file from folderFileOpen(1, "C: \Users\NameList.csv" , OpenMode .Input)Do54 7 Data structures and abstract data types grdTableIn.Rows.Add(1)  grdTableOut.Rows.Add(1) Input(1, DownLoadText) grdTableIn.Rows(RowCount).Cells(0).Value = DownLoadText & RowCount  RowCount = RowCount + 1Loop Until  EOF(1)FileC lose(1)●Binary filesA binary file is one that stores data as a series of 0s and 1s. Binary representation is one of the cornerstones of how computers work and iscovered in detail in Chapter 25. At this stage it is important to understandthat all program code and all of the data that you might use in a programincluding text, graphics and sound are all made up of 0s and 1s. These areusually organised into groups of 8 bits, called bytes. Binary files contain binary codes and usually contain some headerinformation that describes what these represent. As you can see fromFigure 7.3, binary files are not easily readable by a human, but can quicklybe interpreted by a program. 11101111 10111011 10111111 00111100 01101110 01101111 01100100 0110010100100000 01101001 01100100 00111101 00100010 00110001 00110000 0011011100110000 00100010 00100000 01110110 01100101 01110010 01110011 0110100101101111 01101110 00111101 00100010 01100101 01100010 01100011 0011011101100010 01100011 01100001 00110001 00101101 00110011 01100001 0110011001100010 00101101 00110100 01100001 01100001 00110001 00101101 0011100101100001 00110100 01100101 00101101 01100110 01100100 00110000 0110010000110110 00110011 00110110 00110011 01100011 01100010 01100011 0011011100100010 00100000 01110000 01100001 01110010 01100101 01101110 0111010001001001 01000100 00111101 00100010 00101101 00110001 00100010 0010000001101100 01100101 01110110 01100101 01101100 00111101 00100010 0011000100100010 00100000 01110111 01110010 01101001 01110100 01100101 0111001001001001 01000100 00111101 00100010 00110000 00100010 00100000 0110001101110010 01100101 01100001 01110100 01101111 01110010 01001001 0100010000111101 00100010 00110000 00100010 00100000 01101110 01101111 0110010001100101 01010100 01111001 01110000 01100101 00111101 00100010 0011000100110000 00110101 00110110 00100010 00100000 01110100 01100101 0110110101110000 01101100 01100001 01110100 01100101 00111101 00100010 0011000100110000 00110100 00110010 00100010 00100000 01110011 01101111 0111001001110100 01001111 01110010 01100100 01100101 01110010 00111101 0010001000110010 00100010 00100000 01100011 01110010 01100101 01100001 0111010001100101 01000100 01100001 01110100 01100101 00111101 00100010 0011001000110000 00110000 00110111 00101101 00110000 00110100 00101101 0011001000110101 01010100 00110001 00111000 00111010 00110010 00111000 0011101000110010 00110110 00100010 00100000 01110101 01110000 01100100 0110000101110100 01100101 01000100 01100001 01110100 01100101 00111101 00100010 Figure 7.3 Output from a binary ﬁ  leFor example, the PNG image file is a binary file, can be used in a range of applications and requires less memory than some other image formats. Many program files (executables) are created as binary files so that they can be used on other platforms.
 The two main actions you might want to carry out when working with binary files are: ●to write data from the program into a binary file●to read data into the program from a binary file.STATIC AND DYNAMIC DATA  STRUCTURES 55The following code shows how you would write data to a binary file: OpenFile ("DemoFile.bin", Binary) For Output as # 1Write 1, "Help"Write 1,  TrueWrite 1,  3.123Write 1,  5Close #1The following code shows how you would read data from a binary file into a program: Dim TTData as BinaryOpen "TTFile" For Binary As #2  ReDim TTData(1 To LOF(2)) As Byte  Get 2, 1, TTDataClose #2●Static and dynamic data structuresThe way that data can be stored can be split into two broad categories – dynamic and static. This reflects the fact that sometimes the programmer will know how big a data structure will get and therefore how much memory is needed to store it. More often than not, the amount of data stored within a data structure will vary while the program is being run. Different data structures such as queues  and stacks  can be implemented either as static or dynamic structures. ●Static: A static data structure  sto res a set amount of data whichis us ually defined by the programmer. This is done by allocating a set amount of memory to the data structure. Accessing individualelements of data within a static structure is very quick as theirmemory location is fixed. However, the data structure will takeup memory even if it doesn’t need it. Records and some arrays areexamples of static data structures.
 ●Dynamic: The word ‘dynamic’ means changeable. Dyna mic datastruc tures  can use more or less memory as needed through theuse of a heap . In basic terms, unused blocks of memory are placedon a heap, which are then usable within a program. A dynamic data structure is able to take more memory off the heap if it is neededand also put blocks of unused memory back onto the heap if it is notneeded. This is a much more efficient use of resources and a moreflexible solution as elements can be added and removed much moreeasily. Stacks, queues and binary trees are often implemented asdynamic structures. The programmer will normally put a limit on the maximum amount of memory that any one data structure needs. However, it can lead to errors if elements are removed from empty structures or added to full ones. There is more on this in the following chapters.A level onlyKEYWORDS Queue: a data structure where the first item added is the first item removed. Stack: a data structure where the last item added is the first item removed.Static data structure: a method of stor ing data where the amount of data stored (and memory used to store it) is fixed. Dynamic data structure: a method of storing data where the amount of data stored (and memory used to store it) will vary as the program is being run. Heap: a pool of unused memory that can b e allocated to a dynamic data structure.56 7 Data structures and abstract data typesKEY POINTS•A data structure is any method used to store data inan organised and accessibleformat. •An abstract data type is aconceptual mo del of howdata are organised and theoperations on them. •An array is a data structurethat contains data of the same type using a single identifier.•A one-dimensional array isalso  known as a list.
 •Arrays can be multi-dimensional. •Files are used to store data.•A text file is one that simplycont ains lines of text or otherhuman-readable characters.•A binary file is one that storesdata as a s eries of 0s and 1s. •Static data structures storea set amount of data whichis usually defined by theprogrammer. •Dynamic data structures canuse m ore or less memory asneeded through the use of aheap.STUDY / RESEARCH TASKS1 Write code that will: a)write data to a text ﬁle / read data from a text ﬁle b)write data to a binary ﬁle / read data from a binary ﬁle.2 Write code that will: a)create an array b)read data from an array.3 Find out how a stack is used to manage a memory heap.
 4 PNG is a common binary format. Find out about other commonly used  binary ﬁles.5 Why might programmers create executable ﬁles as binary ﬁles?TASKS1 How can you access each element in an array? 2 Explain how you could use an array to keep track of personal best  times for the members of an athletic club. Your solution may require several dimensions.3 Explain the terms file, record and field in relation to data structures.
 4 What are the typical uses of text files?5 What are the typical uses of binary ﬁles? 6 Identify two examples of: a)dynamic data structures b)static data structures.7 Identify two advantages of using dynamic data structures.
 8 Identify two disadvantages of using dynamic data structures.
 9 Why are stack and queues considered to be dynamic data structures?Static data structures Dynamic data structures Inefficient as memory is allocated that may not be needed.Efficient as the amount of memory varies as needed. Fast access to each element of data as the memory location is fixed when the program is written.Slower access to each element as the memory location is allocated at run-time. Memory addresses allocated will be contiguous so quicker to access.Memory addresses allocated may be fragmented so slower to access.
 Structures are a fixed size, making them more predictable to work with. For example, they can contain a header.Structures vary in size so there needs to be a mechanism for knowing the size of the current structure.
 The relationship between different elements of data does not change.The relationship between different elements of data will change as the program is run.
 Table 7.1 Comparison of static and dynamic data structuresPractice questions can be found at the end of the section on page 90.
User: Make the following text more clear.
Format it properly.
Do NOT change the meaning of the words or methods used to obtain the answer or anything like that.
This is for AQA A(S)-Level Computer Science. I repeat, do not alter the words as it could have an effect on the marks acquired from the marking scheme.
However, remove any redundant information or USELESS examples that are not needed for a student to know, or simplify unnecessary information (if it has a definition or keywords, it is not unnecessary).
If you can, use different values for the examples.
For things that will not score a mark or are generally useless, for example, "we will cover" or a fun fact, change the wording. This is for AS Level, do not include information about topics that are ONLY A-Level Content (if it says it is)
Link the 'sections' of your answer to the following spec-points (by title):
e.g. "**Topic** (Spec Points: a.b.c. Whatever)
3.2.1.1 Data structures
Content
Additional information
Be familiar with the concept of data structures.
It may be helpful to set the concept of a data structure in various contexts that students may already be familiar with. It may also be helpful to suggest/demonstrate how data structures could be used in a practical setting.

3.2.1.3 Fields, records and ﬁ les
Content
Additional information
Be able to read/write from/to a text file.
Be able to read/write data from/to a binary (non-text) file.

3.2.1.2 Single- and multi-dimensional arrays (or equivalent)
Content
Additional information
Use arrays (or equivalent) in the design of solutions to simple problems.
A one-dimensional array is a useful way of representing a vector. A two-dimensional array is a useful way of representing a matrix. More generally, an
n
-dimensional array is a set of elements with the same data type that are indexed by a tuple of
n
integers, where a tuple is an ordered list of elements.


You MUST make sure they are ALL met. Everything it says on there you should meet.
SOMETIMES the specification does not always mention everything. If you encounter something from the body of text that is not necessarily mentioned on the specification point, still try to include it but condense it. Do not make the notes unecessary or useless.

*If* the exam question has an image or any exam question has an image that may potentially increase the understanding and reliability of the notes, just link the image.

I already provided the available exam questions you MAY choose to add on to the notes, with 'des' explaining what it's about, and 'fil' meaning the Question ID.
The content, too. Delivered in the form 'fil', JSON
Ignore exam questions that contain 'Skeleton Program'. Do not only put like 2 exam questions, try to put more!
For the exam questions, in the original text, there is a label named 'Tasks'. Those (usually) six questions are NOT the exa questions. The exam questions are the ones that were given in JSON form to you, do NOT do the 'Tasks'. Do the exam questions that contain HTML in JSON!

In the markscheme, a ';' typically means that a mark was gained.
When mentioning exam questions, you *must* answer them, according to the markscheme, scoring full marks. No 'do it yourself'.

Include ALL definitions (KEYWORDS) from the original text I sent in your notes. When I mean all, I mean ALL.

If necessary for scoring marks, try to embed the exam-questions into your notes, sometimes without even referencing the fact that it is an exam question. For example, if an exam question is a definition or benefits, use the answer in your notes.
Remember. DO NOT ADD USELESS STUFF. Your task is to create the MOST EFFICIENT (SHORTEST [for an explanation] BUT STILL SCORES ALL MARKS) possible notes resource, which will score all marks easily, so its wording has to be mostly like that of the exam questions. By any means, if necessary, please include examples and exam questions! At the end you can have a 'try these exam questions' thing.
At the end of your answer, you will give a 'breakdown'/'summary' of each thing you covered which will tell the most concise FULLY MARK-SCORING explanation possible.

In summary, your answer must:

* Be efficient, useful
* For topics in an exam that may require some form of mathematical working, always show an example of a question.
* Be clear – provide clear, step-by-step examples/instructions when needed.
* Follow the entire specification and everything it says.
* Link your section to a spec point. E.g. **Topic** (Spec Points: a.b.c Whatever)
* Score ALL marks.
* Include ALL exam questions S at the end (except ones that contain 'Skeleton Program'), with the same wording as the original ones in the JSONs sent to you – and INCLUDE THE QUESTION CONTENT, AND THE ANSWERS/MARK SCHEME. Only the ones that I provided to you, include Question IDs.
* Remove redundant, unnecessary and useless information that would not be brought up in an exam answer.
* Be helpful to the reader
* Provide the full notes, covering ALL spec-points (and showing the spec-points covered in each section).
* Include ALL definitions (KEYWORDS, usually represented explicitly and specifically in the original text as Keyword: Definition), do not change the wording (unless that definition is an exam question). MAKE ALL THE DEFINITIONS FULL (yet consice, as they can sometimes even be 2 marks). Incorporate the definitons into the notes.
* Include a seperate section named 'Definitions' that covers the keywords and their simplest definition that scores all marks. These are (usually) found in the original text.
* Include a summary at the end (after definitions) that goes through everything you need to score all marks.

At the end of the formatted text, after everything is done, fill out the JSON:
Remove the type clarification.
{
"chapter": (int),
"page": (int),
"chapter_name": (str),
"topics": (list)
}

User: And these are the available exam questions, with 'des' explaining what it's about, and 'fil' meaning the Question ID.
{'S2$.1.a': [{'index1': '|D.A$|D.D$|K$|', 'index2': '|2$|', 'index3': '3$', 'index4': 'S1$.1.a | S2$.1 | S2$.1.a | S2$.1.b | S2$.1.c', 'index5': '|1$|', 'index6': 'Q23S1B07', 'qid': 'Q23S1B07', 'des': 'Data structure; array; record; identifier', 'index7': '', 'marks': '2 marks', 'time': '3', 'ttext': 'Programming concepts | Data structures | Preliminary material', 'fld': 'AA_COM', 'fil': 'Q23S1B07', 'year': 2023, 'res': '/RESOURCES/AA_COM/RESOURCES/2023_AS_SectionB_resources.html', 'flag1': 0}, {'index1': '|D.B$|D.D$|', 'index2': '|3$|', 'index3': '3$', 'index4': 'S2$.1.a | L2$.1.a | L2$.1.d', 'index5': '|', 'index6': 'QW03401', 'qid': 'QW03401', 'des': 'Linked list; dynamic structure', 'index7': '', 'marks': '8 marks', 'time': '12', 'ttext': 'Algorithms | Data structures', 'fld': 'AA_COM', 'fil': 'QW03401', 'year': 2003, 'res': '', 'flag1': 0}, {'index1': '|D.D$|K$|', 'index2': '|2$|', 'index3': '2$', 'index4': 'S1$.1.a | S2$.1.a | S2$.1.c', 'index5': '|2$|', 'index6': 'QS19S1B05', 'qid': 'QS19S1B05', 'des': 'Data structure with multiple types; records', 'index7': '', 'marks': '1 marks', 'time': '1', 'ttext': 'Data structures | Preliminary material', 'fld': 'AA_COM', 'fil': 'QS19S1B05', 'year': 2019, 'res': '/RESOURCES/AA_COM/RESOURCES/AS_P1_Summer2019.html', 'flag1': 1}], 'S2$.1.c': [{'index1': '|D.A$|K$|', 'index2': '|2$|', 'index3': '3$', 'index4': 'S1$.1.g | S1$.1.k | S2$.1.c', 'index5': '|12$|', 'index6': 'Q20S1B09', 'qid': 'Q20S1B09', 'des': 'State purpose of a parameter and describe how data processed in Skeleton Program', 'index7': '', 'marks': '4 marks', 'time': '5', 'ttext': 'Programming concepts | Preliminary material', 'fld': 'AA_COM', 'fil': 'Q20S1B09', 'year': 2020, 'res': '/RESOURCES/AA_COM/RESOURCES/AS_P1_Section_B_Summer2020.html', 'flag1': None}, {'index1': '|D.A$|D.B$|D.C$|K$|', 'index2': '|2$|', 'index3': '1$', 'index4': 'S1$.1.b | S2$.1.c', 'index5': '|20$|', 'index6': 'QS17S1B07', 'qid': 'QS17S1B07', 'des': 'File access', 'index7': '', 'marks': '6 marks', 'time': '5', 'ttext': 'Programming concepts | Algorithms | Practical programming | Preliminary material', 'fld': 'AA_COM', 'fil': 'QS17S1B07', 'year': 2017, 'res': '/RESOURCES/AA_COM/RESOURCES/AS_P1_Summer2017.html', 'flag1': 1}, {'index1': '|C.B$|F.A$|', 'index2': '|1$|', 'index3': '3$', 'index4': 'S1$.1.a | S2$.1.c | S7$.4.a | L1$.1.a | L2$.1.c | L7$.4.a', 'index5': '|', 'index6': 'QS0326A', 'qid': 'QS0326A', 'des': 'I/O hardware; fields; hashing', 'index7': '', 'marks': '9 marks', 'time': '14', 'ttext': 'Input and output devices | Files and validation', 'fld': 'AA_COM', 'fil': 'QS0326A', 'year': 2003, 'res': '', 'flag1': 0}], 'S2$.1.b': [{'index1': '|D.A$|D.D$|', 'index2': '|3$|', 'index3': '3$', 'index4': 'S1$.1.b | S2$.1.b | L1$.1.b | L2$.1.b | L2$.3', 'index5': '|', 'index6': 'QW06402', 'qid': 'QW06402', 'des': 'Stack: implementation: array/ linked list', 'index7': '', 'marks': '4 marks', 'time': '6', 'ttext': 'Programming concepts | Data structures', 'fld': 'AA_COM', 'fil': 'QW06402', 'year': 2006, 'res': '', 'flag1': 0}, {'index1': '|D.B$|', 'index2': '|3$|', 'index3': '3$', 'index4': 'S2$.1.b | S4$.1.a | S4$.1.b | L2$.1.b | L3$.4.b | L4$.1.a | L4$.1.b', 'index5': '|', 'index6': 'QS00N110', 'qid': 'QS00N110', 'des': 'Binary/linear search', 'index7': '', 'marks': '9 marks', 'time': '14', 'ttext': 'Algorithms', 'fld': 'AA_COM', 'fil': 'QS00N110', 'year': 0, 'res': '', 'flag1': 0}, {'index1': '|D.A$|K$|', 'index2': '|2$|', 'index3': '3$', 'index4': 'S1$.1.k | S2$.1.b | S2$.1.c', 'index5': '|12$|', 'index6': 'Q20S1B11', 'qid': 'Q20S1B11', 'des': 'Explain the effect of modifying a file when loading it into the Skeleton Program', 'index7': '', 'marks': '6 marks', 'time': '7', 'ttext': 'Programming concepts | Preliminary material', 'fld': 'AA_COM', 'fil': 'Q20S1B11', 'year': 2020, 'res': '/RESOURCES/AA_COM/RESOURCES/AS_P1_Section_B_Summer2020.html', 'flag1': None}]}

User: These are the content of said exam questions, these are the ONLY exam questions, you will use these later, delivered in form 'fil', JSON: {'Q23S1B07': {'question': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">The <b>Skeleton Program</b> uses a number of data structures.</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1">(a)&emsp;&nbsp;State the identifier of a data structure that stores values of <b>more than one data type</b>.</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="mark">(1)</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1">(b)&emsp;&nbsp;State the identifier of a data structure that stores values of <b>only one data type</b>.</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="mark">(1)</p>\r\n<p class="mark">(Total 2 marks)</p></h5>', 'markscheme': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="questiona">(a)&emsp;&nbsp;<b>Mark is for AO1 (understand)</b></p>\r\n<p class="indent2new indentright"><span class="comp-top">AssemblerInstruction;</span></p>\r\n<p class="indent2new indentright"><b>A.</b> <span class="comp-top">Memory / SymbolTable;</span></p>\r\n<p class="indent2new indentright m-t-0"><b>R.</b> if any additional code</p>\r\n<p class="indent2new indentright m-t-0"><b>R.</b> if spelt incorrectly</p>\r\n<p class="indent2new indentright m-t-0"><b>I.</b> case &amp; spacing</p>\r\n<p class="indent2new indentright"><b>Max 1</b></p>\r\n<p class="levelms">1</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1 indentright">(b)&emsp;&nbsp;<b>Mark is for AO1 (understand)</b></p>\r\n<p class="indent2new indentright comp-top">SourceCode / Registers / OpCodeValues;</p>\r\n<p class="indent2new indentright"><b>A.</b> <span class="comp">Memory / SymbolTable;</span> <b>(if neither given in part (a))</b></p>\r\n<p class="indent2new indentright m-t-0"><b>R.</b> if any additional code</p>\r\n<p class="indent2new indentright m-t-0"><b>R.</b> if spelt incorrectly</p>\r\n<p class="indent2new indentright m-t-0"><b>I.</b> case &amp; spacing</p>\r\n<p class="indent2new indentright"><b>Max 1</b></p>\r\n<p class="levelms">1</p>\r\n<p class="mark">[2]</p></h5>', 'examinerreport': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">For both question parts, most students gained the mark. As this question related to data structures rather than subroutines, additional code was less frequently included here.</p></h5>', 'notes': '', 'resources': ''}, 'QW03401': {'question': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">&nbsp;</p>\r<p class="indent1a m-t-0">(a)&nbsp;&nbsp;&nbsp;&nbsp; (i)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The birds Pheasant, Teal, Widgeon, Partridge, Woodpigeon are entered, in the order given, into a linked list so that they may be processed alphabetically. Draw this linked list.</p>  \r<p class="indent2new answer-toggle">&nbsp;</p>  \r<p class="indent2new answer-toggle">&nbsp;</p>  \r<p class="indent2new answer-toggle">&nbsp;</p>  \r<p class="indent2new answer-toggle">&nbsp;</p>  \r<p class="indent2new answer-toggle">&nbsp;</p>  \r<p class="mark">(2)</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent2">(ii)&nbsp;&nbsp;&nbsp;&nbsp; Redraw the list after two additional items, Grouse and Snipe, are added.</p> \r<p class="indent2new answer-toggle">&nbsp;</p>  \r<p class="indent2new answer-toggle">&nbsp;</p>  \r<p class="indent2new answer-toggle">&nbsp;</p>  \r<p class="indent2new answer-toggle">&nbsp;</p>  \r<p class="indent2new answer-toggle">&nbsp;</p>  \r<p class="indent2new answer-toggle">&nbsp;</p>  \r<p class="indent2new answer-toggle">&nbsp;</p>   \r<p class="mark">(2)</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1">(b)&nbsp;&nbsp;&nbsp;&nbsp; This linked list is said to be a <i>dynamic structure. </i>What is meant by the term dynamic structure?</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="mark">(2)</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1">(c)&nbsp;&nbsp;&nbsp;&nbsp; Explain how memory was allocated for the two additional data items.</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="mark">(2)</p>  \r<p class="mark">(Total 8 marks)</p></h5>', 'markscheme': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">&nbsp;</p>\r<p class="indent1a indentright m-t-0">(a)&nbsp;&nbsp;&nbsp;&nbsp; (i)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Data must be in given order</p>  \r<p class="indent3 indentright m-t-0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pheasant&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2</p>  \r<p class="indent3 indentright m-t-0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; teal&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3</p>  \r<p class="indent3 indentright m-t-0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; widgeon&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5</p>  \r<p class="indent1new indentright m-t-0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; partridge&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1</p>  \r<p class="indent1new indentright" style=\'margin-top:0cm;text-indent:2.0cm\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; woodpigeon&nbsp;&nbsp;&nbsp; 0</p>  \r<p class="indent1new indentright">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//</p>  \r<p class="indent1"><img width=616 height=91 id="Picture 1" src="AA_COM/MW03401_files_M/image001.png">&nbsp;</p>  \r<p class="indent2new indentright"><i>End Pointer can be blank</i></p>  \r<p class="indent2new indentright m-t-0"><i>1 for correct START and END pointers;</i></p>  \r<p class="indent2new indentright m-t-0"><i>1 for correctly numbered nodes and correct pointers (Need all birds);</i></p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent2 indentright">(ii)&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp; pheasant&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7</p>  \r<p class="indent3 indentright" style=\'margin-top:0cm;margin-right:1.0cm;margin-bottom:0cm; margin-left:3.0cm;margin-bottom:.0001pt;text-indent:0cm\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp; teal&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3</p>  \r<p class="indent3 indentright" style=\'margin-top:0cm;margin-right:1.0cm;margin-bottom:0cm; margin-left:3.0cm;margin-bottom:.0001pt;text-indent:0cm\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp; widgeon&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5</p>  \r<p class="indent3 indentright" style=\'margin-top:0cm;margin-right:1.0cm;margin-bottom:0cm; margin-left:3.0cm;margin-bottom:.0001pt;text-indent:0cm\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4&nbsp;&nbsp;&nbsp;&nbsp; partridge&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1</p>  \r<p class="indent3 indentright" style=\'margin-top:0cm;margin-right:1.0cm;margin-bottom:0cm; margin-left:3.0cm;margin-bottom:.0001pt;text-indent:0cm\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5&nbsp;&nbsp;&nbsp;&nbsp; woodpigeon&nbsp;&nbsp;&nbsp;0</p>  \r<p class="indent2new indentright" style=\'margin-top:0cm;\'>START&nbsp;&nbsp;&nbsp;&nbsp; 6&nbsp;&nbsp;&nbsp;&nbsp; grouse&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4</p>  \r<p class="indent3 indentright" style=\'margin-top:0cm;margin-right:1.0cm;margin-bottom:0cm; margin-left:127.55pt;margin-bottom:.0001pt;text-indent:-21.25pt\'>7&nbsp;&nbsp;&nbsp;&nbsp; snipe&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2</p>  \r<p class="indent2new indentright">//&nbsp;&nbsp; correctly amended diagram</p>  \r<p class="indent2new indentright"><i>1 for grouse and snipe physically at end;</i></p>  \r<p class="indent2new indentright m-t-0"><i>1 for correct pointers (if not as ms than clear and logical);</i></p>  \r<p class="levelms">2</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1 indentright">(b)&nbsp;&nbsp;&nbsp;&nbsp; The amount of memory taken up can vary;</p>  \r<p class="indent2new indentright">// The size / length of the structure / linked list can vary;</p>  \r<p class="indent2new indentright"><i>1 mark</i></p>\r<p class="indent2new indentright">at run time;</p>  \r<p class="indent2new indentright"><i>1 mark</i></p>\r<p class="levelms">2</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1 indentright">(c)&nbsp;&nbsp;&nbsp;&nbsp; A heap / stack/ a pool of available locations;</p>  \r<p class="indent2new indentright m-t-0">A pointer holds the address of the allocated block / next available location;</p>  \r<p class="levelms">2</p>  \r<p class="mark">[8]</p></h5>', 'examinerreport': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">This question referred to the loading of data into a linked list. No marks were given if the items had not been loaded in the given order. Binary trees were not credited.</p>  \r<p class="indent1new">In part (a), nodes should have been numbered with correct links. A start pointer was expected with some indication of the last item. In (ii) ‘snipe’ and ‘grouse’ had to be added at the end of the list and the pointers amended correctly to incorporate them.</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1new">In (b), many candidates correctly said that in a dynamic structure the amount of memory required would vary but few gained the second mark here by stating that this would be at run time. Size was an acceptable alternative to amount of memory required, but it was insufficient to say that ‘items could be added or deleted’. Incorrect answers included the ability to sort items.</p>  \r<p class="indent1new">In (c), answers that memory is allocated from a heap or pool of available locations and pointers hold the address of the next free location or of the last allocated block gained both marks.</p></h5>', 'notes': '', 'resources': ''}, 'QS19S1B05': {'question': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">The Skeleton Program uses several data structures.</p>\r\n<p class="indent1new">State the identifier of the data structure that stores values of more than one data type.</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="mark">(Total 1 mark)</p></h5>', 'markscheme': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question"><b>Mark is for AO1 (understand)</b></p>\r\n<p class="indent1new comp-top">MoveRecord</p>\r\n<p class="indent1new comp">/ListOfMoves;</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1new"><b>R.</b> if any additional code</p>\r\n<p class="indent1new m-t-0"><b>R.</b> if spelt incorrectly</p>\r\n<p class="indent1new m-t-0"><b>R.</b> case & spacing</p>\r\n<p class="mark">[1]</p></h5>', 'examinerreport': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">The majority of students gained this mark.</p></h5>', 'notes': '', 'resources': ''}, 'Q20S1B09': {'question': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question m-b-1">This question refers to the subroutines <span class="comp">Graphics</span> and <span class="comp">LoadFile</span></p>\r\n<p class="indent1">(a)&emsp;&nbsp;State what values are passed in the parameter <span class="comp-top">Header</span> to the subroutine <span class="comp">LoadFile</span> when <span class="comp">LoadFile</span> is called for the <b>first</b> time in the subroutine <span class="comp">Graphics</span></p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="mark">(1)</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1">(b)&emsp;&nbsp;Explain how the content of <span class="comp">HeaderLine</span> is processed after it has been assigned a value.</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="mark">(3)</p>\r\n<p class="mark">(Total 4 marks)</p></h5>', 'markscheme': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="questiona">(a)&emsp;&nbsp;<b>Mark is for AO2 (analyse)</b> </p>\r\n<p class="indent2new indentright">The default values of the file header;</p>\r\n<p class="indent2new indentright m-t-0">Empty string, <span class="comp">MAX_WIDTH, MAX_HEIGHT</span>, empty string;</p>\r\n<p class="indent2new indentright"><b>A.</b> \'\'\'\' / \'\' / <span class="comp">EMPTY_STRING</span> for empty string</p>\r\n<p class="indent2new indentright m-t-0"><b>A.</b> 100 for <span class="comp">MAX_WIDTH</span> and/or <span class="comp">MAX_HEIGHT</span></p>\r\n<p class="indent2new indentright"><b>Max 1</b></p>\r\n<p class="levelms">1</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1 indentright">(b)&emsp;&nbsp;<b>3 marks for AO2 (analyse)</b> </p>\r\n<p class="indent2new indentright">The string is split into separate parts;</p>\r\n<p class="indent2new indentright m-t-0">Delimited by a comma;</p>\r\n<p class="indent2new indentright m-t-0">Each part is assigned to a field of the header record;</p>\r\n<p class="indent2new indentright m-t-0"><b>A.</b> File type is used to determine which subroutine is called;</p>\r\n<p class="indent2new indentright"><b>Max 3</b></p>\r\n<p class="levelms">3</p>\r\n<p class="mark">[4]</p></h5>', 'examinerreport': '', 'notes': '', 'resources': ''}, 'QS17S1B07': {'question': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">This question refers to the subroutine <span class="comp">ReadFile</span>.</p>\r\n<p class="indent1">(a)&emsp;&nbsp;Explain what will happen if the number of rows and columns supplied in the data file is greater than the number of rows and columns of the field modelled in the <b>Skeleton Program</b>.</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="mark">(2)</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1">(b)&emsp;&nbsp;Assume it is a perfect growing year and there is no frost in spring and no drought in summer.</p>\r\n<p class="indent2new">A <b>Data File</b> is read in which has an S (seed) in every possible location.</p>\r\n<p class="indent2new">Explain what happens to the contents of <span class="comp">Field</span> in each season for the <b>first year only</b>.</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="mark">(4)</p>\r\n<p class="mark">(Total 6 marks)</p></h5>', 'markscheme': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="questiona indentright">(a)&emsp;&nbsp;<b>All marks for AO2 (analyse)</b></p>\r\n<p class="indent2 indentright">1.&emsp;&ensp;&nbsp;Program will load top-most/first rows read // bottom rows are ignored/not used;</p>\r\n<p class="indent2 indentright m-t-0">2.&emsp;&ensp;&nbsp;Program will load left-most/first columns read // rightmost columns are ignored / not used;</p>\r\n<p class="indent2 indentright"><b>A.</b> extra data beyond bounds of field are ignored for <b>2 marks</b></p>\r\n<p class="indent2 indentright m-t-0"><b>A.</b> read data from top left corner, ignoring extra data for <b>2 marks</b></p>\r\n<p class="indent2 indentright m-t-0"><b>A.</b> extra data is ignored for <b>1 mark</b></p>\r\n<p class="levelms">2</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1 indentright">(b)&emsp;&nbsp;<b>All marks for AO1 (understanding)</b></p>\r\n<p class="indent2 indentright">1.&emsp;&ensp;&nbsp;Spring: every seed becomes a plant because there is no frost</p>\r\n<p class="indent2 indentright m-t-0">&emsp;&ensp;&nbsp;&nbsp;&nbsp;&nbsp;// every location contains &#8220;P&#8221;;</p>\r\n<p class="indent2 indentright m-t-0">2.&emsp;&ensp;&nbsp;Summer: no change because there is no drought;</p>\r\n<p class="indent2 indentright m-t-0">3.&emsp;&ensp;&nbsp;Autumn: no seed can land as there is no soil</p>\r\n<p class="indent2 indentright m-t-0">&emsp;&ensp;&nbsp;&nbsp;&nbsp;&nbsp;// no seed can land as every location contains &#8220;P&#8221;;</p>\r\n<p class="indent2 indentright m-t-0">&emsp;&ensp;&nbsp;&nbsp;&nbsp;&nbsp;<b>A.</b> no change because there is nowhere for seed to land;</p>\r\n<p class="indent2 indentright m-t-0">4.&emsp;&ensp;&nbsp;Winter: only soil in the field // field will be empty;</p>\r\n<p class="levelms">4</p>  \r\n<p class="mark">[6]</p></h5>', 'examinerreport': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">The majority of students secured all of the marks for this question by explaining that the extra rows and columns would be ignored. Some students wrongly thought that an exception would be generated and therefore a new field created.</p>\r\n<p class="indent1new">Many students missed out on some marks because they did not explain what happens in each season. It was not sufficient to state that in spring every seed changed into a plant and nothing changed in summer. An acceptable explanation was that in spring every location would have a plant in it as there was no frost and there was no change in summer because there was no drought. Most students gained the two marks for explaining that in autumn the seeds dropped but could not land as there were no free locations and therefore in winter, when all the plants died, the field would be left totally empty.</p></h5>', 'notes': '', 'resources': ''}, 'QS0326A': {'question': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">A multi-storey car park is controlled by a computer system as follows.</p>  \r<p class="indent1new">For a vehicle arriving at the barrier-controlled <i>entrance</i>:</p>  \r<p class="indent1">•&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the computer system generates an integer number at random from a set of unused numbers which identifies the vehicle to the system</p>  \r<p class="indent1 m-t-0">•&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the vehicle’s driver collects a ticket containing this number from a machine at the barrier</p>  \r<p class="indent1 m-t-0">•&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; after a short interval a barrier is raised to enable the car to enter the car park</p>  \r<p class="indent1 m-t-0">•&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the computer system remembers the current date, the arrival time and the randomly generated number.</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1new">If the car park is full a sign is lit to indicate the situation and no vehicle is allowed to enter the car park.</p>  \r<p class="indent1new">For a vehicle arriving at the barrier-controlled <i>exit</i>:</p>  \r<p class="indent1">•&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the ticket is presented to a machine which reads the number on the ticket</p>  \r<p class="indent1 m-t-0">•&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the computer system determines the length of time the vehicle has been parked in the car park and calculates the amount to pay</p>  \r<p class="indent1 m-t-0">•&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the amount to pay is displayed on the machine</p>  \r<p class="indent1 m-t-0">•&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the driver inserts the correct money into the machine</p>  \r<p class="indent1 m-t-0">•&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the computer system records the length of time in minutes and the amount to pay in pence</p>  \r<p class="indent1 m-t-0">•&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; after a short interval the barrier is raised to enable the vehicle to exit.</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1">(a)&nbsp;&nbsp;&nbsp;&nbsp; Taking account of the technology that could be used for ticket production at the entrance barrier, describe <b>two </b>different ways for the number assigned to the ticket to be submitted to the computer system at the exit barrier. Your answer should include a reference to the relevant input/output hardware used.</p>  \r<p class="indent2new answer-toggle">1. _________________________________________________________________</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="indent2new answer-toggle">2. _________________________________________________________________</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="mark">(4)</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1">(b)&nbsp;&nbsp;&nbsp;&nbsp; Using the table below, construct an appropriate record structure for the computer system to use to record the relevant car parking details for one vehicle. Data types should be given that would be available in a third generation programming language.</p>  \r<p class="bottom">&nbsp;</p>  \r<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=5  style=\'margin-left:48pt;border-collapse:collapse\'>  \r\t<tr>      \r\t\t<td width=295 valign=top style=\'width:177.2pt;border:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt\'><p class=box><b>Field Name</b></p></td>   \r\t\t<td width=354 valign=top style=\'width:212.65pt;border:solid windowtext 1.0pt;border-left:none;padding:0cm 5.4pt 0cm 5.4pt\'><p class=box><b>Data Type</b></p></td>  \r\t</tr>  \r\t<tr>      \r\t\t<td width=295 valign=top style=\'width:177.2pt;border:solid windowtext 1.0pt;border-top:none;padding:0cm 5.4pt 0cm 5.4pt\'><p class=box>&nbsp;</p></td>   \r\t\t<td width=354 valign=top style=\'width:212.65pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt\'><p class=box>&nbsp;</p></td>  \r\t</tr>  \r\t<tr>      \r\t\t<td width=295 valign=top style=\'width:177.2pt;border:solid windowtext 1.0pt;border-top:none;padding:0cm 5.4pt 0cm 5.4pt\'><p class=box>&nbsp;</p></td>   \r\t\t<td width=354 valign=top style=\'width:212.65pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt\'><p class=box>&nbsp;</p></td>  \r\t</tr>  \r\t<tr>      \r\t\t<td width=295 valign=top style=\'width:177.2pt;border:solid windowtext 1.0pt;border-top:none;padding:0cm 5.4pt 0cm 5.4pt\'><p class=box>&nbsp;</p></td>   \r\t\t<td width=354 valign=top style=\'width:212.65pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt\'><p class=box>&nbsp;</p></td>  \r\t</tr>  \r\t<tr>      \r\t\t<td width=295 valign=top style=\'width:177.2pt;border:solid windowtext 1.0pt;border-top:none;padding:0cm 5.4pt 0cm 5.4pt\'><p class=box>&nbsp;</p></td>   \r\t\t<td width=354 valign=top style=\'width:212.65pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt\'><p class=box>&nbsp;</p></td>  \r\t</tr>  \r\t<tr>      \r\t\t<td width=295 valign=top style=\'width:177.2pt;border:solid windowtext 1.0pt;border-top:none;padding:0cm 5.4pt 0cm 5.4pt\'><p class=box>&nbsp;</p></td>   \r\t\t<td width=354 valign=top style=\'width:212.65pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt\'><p class=box>&nbsp;</p></td>  \r\t</tr> \r</table>  \r<p class="mark">(5)</p>  \r<p class="mark">(Total 9 marks)</p></h5>', 'markscheme': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">&nbsp;</p>\r<p class="indent1 indentright m-t-0">(a)&nbsp;&nbsp;&nbsp;&nbsp; <i>Any two at two each; If entrance method doesn’t match exit method mark one wrong and the other correct</i></p>\r<p class="indent2new indentright m-t-0"><b>R</b> Voice <b>R</b> Written to ticket</p>  \r<p class="indent2new indentright m-t-0">Computer system/Printer prints number on ticket at entrance;</p>  \r<p class="indent2new indentright m-t-0">Driver types number into system using a keypad at exit barrier;</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent2new indentright">Computer system encodes number on a magnetic stripe on ticket at entrance;</p>  \r<p class="indent2new indentright m-t-0"><b>R</b> Magnetic card</p>  \r<p class="indent2new indentright m-t-0">Ticket number read by a magnetic stripe reader at exit//inserted into a magnetic stripe reader at exit; <b>A </b>magnetic strip/stripe scanner</p>  \r<p class="indent2new indentright">Computer system/Printer prints number printed on ticket at entrance;</p>  \r<p class="indent2new indentright m-t-0">Number read by an optical character reader/OCR at exit//ticket inserted into an optical character reader at exit;</p>  \r<p class="indent2new indentright">Computer system/Printer prints number in barcode form on ticket at entrance;</p>  \r<p class="indent2new indentright m-t-0">Number read by barcode reader at exit//ticket inserted into barcode reader at exit;</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent2new indentright">Computer system/Printer at entrance punches holes on ticket which are a coded form of number//Kimbal tag produced at entrance which encodes number;</p>  \r<p class="indent2new indentright m-t-0">Number read by sensor (mechanical or optical) at exit//ticket inserted into sensor at exit//Number read by Kimball tag reader at exit;</p>  \r<p class="indent2new indentright">Computer system/printer prints number using magnetic ink;</p>  \r<p class="indent2new indentright m-t-0">At exit MICR<b> </b>reader reads number;</p>  \r<p class="indent2new indentright">Computer system/printer prints marks (encoding number) on ticket;</p>  \r<p class="indent2new indentright m-t-0">At exit, OMR<b> </b>device is used;</p>  \r<p class="levelms">4</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1 indentright">(b)&nbsp;&nbsp;&nbsp;&nbsp; <b>R</b> any other data types. Mark is for field name + correct data type.</p>  \r<p class="indent2new indentright">NB synonyms for RandomNumber must include Number, e.g. IDNo, TicketNo, Number. <b>A</b> RandomInteger, <b>R </b>e.g. Vehicle ID <b>A</b> VehicleIDNo</p>  \r<p class="indent2new indentright"><b>A</b> DateTicketWasIssued</p>  \r<p class="indent2 indentright"><span class="comp">Record</span></p>  \r<p class="indent2 indentright"><span class="comp">&nbsp; RandomNo : Integer; </span><br><b>R</b> anything else</p>  \r<p class="levelms">1</p>  \r<p class="indent2 indentright"><span class="comp">CurrentDate :</span></p>  \r<p class="indent2 indentright"><span class="comp">&nbsp;&nbsp;&nbsp; String/Date/DateTime/TDateTime/TDate;</span></p>  \r<p class="levelms">1</p>  \r<p class="indent2 indentright"><span class="comp">&nbsp; ArrivalTime : </span></p>  \r<p class="indent2 indentright"><span class="comp">&nbsp;String/Integer/Time/DateTime/TDateTime/TTime;</span></p>  \r<p class="levelms">1</p>  \r<p class="indent2 indentright"><span class="comp">&nbsp; LengthOfTime/LengthOfStay/TimeStayed : Integer; </span></p>  \r<p class="indent2 indentright"><b>R</b> anything else</p>  \r<p class="levelms">1</p>  \r<p class="indent2 indentright"><span class="comp">&nbsp; Cost/AmountToPay : Integer/BCD;</span></p>  \r<p class="levelms">1</p>  \r<p class="indent2 indentright"><span class="comp">End;</span></p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent2new indentright"><b>A</b> Alphanumeric for String</p>  \r<p class="indent2new indentright m-t-0"><b>R</b> Text <b>R</b> LeavingTime <b>R</b> Binary,Byte,LongInteger</p>  \r<p class="indent2new indentright m-t-0"><b>R</b> Date for FieldName</p>  \r<p class="indent2new indentright m-t-0"><b>R</b> Date/Time but don’t penalise twice</p>  \r<p class="mark">[9]</p></h5>', 'examinerreport': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">Many candidates were able to suggest a suitable method at the exit barrier for submitting the number assigned to the ticket to the computer system. Fewer were careful enough to describe how the ticket was assigned to the ticket at the entrance barrier. The examiners were expecting a printer to be referenced or the action of printing in the case of a barcode, OMR, OCR, MICR and plain text solution for writing a number to the ticket; the action of encoding or writing to the ticket in the case of a magnetic stripe or smart card and the action of punching in the case of Kimball or Kimball-type tags. The better candidates offered such descriptions.</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1new">A lack of experience of using a third generation programming language was exposed by part (b). Many candidates gave data types that were lifted straight from Microsoft ACCESS and therefore gained no credit. The question explicitly requested data types that would be available in a third generation programming language. Candidates must understand that their study of this subject must extend beyond products that have been intentionally designed to enable people with no background in Computing, and no desire to be educated in this subject, to achieve practical results in the minimum of time. For very simple practical tasks, this is desirable but as a foundation for more extensive tasks this is a recipe for disaster. Assembling flat-pack furniture is not considered adequate enough to qualify as a cabinetmaker.</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1new">Some candidates had difficulty selecting relevant fields and in some cases when they did choose relevant ones lost a mark for poor choice of identifier. For example, several candidates chose <i>Date</i> instead of <i>CurrentDate</i>. The clue was in the question stem which stated that “the computer system remembers the <i>Current Date, Arrival Time </i>and <i>Randomly generated Number</i>.“ A principle of software engineering is that identifiers should be meaningful and reflect the real world entities which they represent.</p></h5>', 'notes': '', 'resources': ''}, 'QW06402': {'question': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">A stack may be implemented by using either an array or a linked list.</p>  \r<p class="indent1">(a)&nbsp;&nbsp;&nbsp;&nbsp; Give a disadvantage of:</p>  \r<p class="indent2">(i)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; an array implementation;</p>  \r<p class="indent3new answer-toggle">______________________________________________________________</p>  \r<p class="mark">(1)</p>  \r<p class="indent2">(ii)&nbsp;&nbsp;&nbsp;&nbsp; a linked list implementation.</p>  \r<p class="indent3new answer-toggle">______________________________________________________________</p>  \r<p class="mark">(1)</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1">(b)&nbsp;&nbsp;&nbsp;&nbsp; Under what circumstances would it be more appropriate to use:</p>  \r<p class="indent2">(i)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; an array;</p>  \r<p class="indent3new answer-toggle">______________________________________________________________</p>  \r<p class="mark">(1)</p>  \r<p class="indent2">(ii)&nbsp;&nbsp;&nbsp;&nbsp; a linked list.</p>  \r<p class="indent3new answer-toggle">______________________________________________________________</p>  \r<p class="mark">(1)</p>  \r<p class="mark">(Total 4 marks)</p></h5>', 'markscheme': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">&nbsp;</p>\r<p class="indent1a indentright m-t-0">(a)&nbsp;&nbsp;&nbsp;&nbsp; (i)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Empty entries <u>waste</u> space // Maximum/fixed/static size</p>  \r<p class="indent3new indentright m-t-0"><b>A </b>stack may overflow</p>  \r<p class="levelms">1</p>  \r<p class="indent2 indentright">(ii)&nbsp;&nbsp;&nbsp;&nbsp; Space used by <u>pointers</u> // more complex to <u>program</u>;</p>  \r<p class="levelms">1</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1a indentright" >(b)&nbsp;&nbsp;&nbsp;&nbsp; (i)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The size of the stack /amount of data is known/limited/predictable </p>  \r<p class="indent3new indentright m-t-0">Memory saved since no pointers (if not given in a (ii))</p>  \r<p class="indent3new indentright m-t-0"><b>R</b> easier to program</p>  \r<p class="levelms">1</p>  \r<p class="indent2 indentright" style=\'margin-left:92.7pt;text-indent:-36.0pt\'>(ii)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The size of the stack is unknown//</p>  \r<p class="indent3new indentright m-t-0">The stack is volatile/ number of items fluctuates widely;</p>  \r<p class="levelms">1</p>  \r<p class="mark">[4]</p></h5>', 'examinerreport': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">Although a short question, it proved difficult for most candidates. Many missed the point that both part (a) and part (b) were about the <i>implementation</i> of a stack, and in part (b) gave answers that were about applications that were suitable for a linked list or an array. However, we can note one particularly lucid answer to part (a)(i): “This is a static data structure with a finite pre-declared capacity.”</p></h5>', 'notes': '', 'resources': ''}, 'QS00N110': {'question': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">The memory of a computer holds an array of records, each of which includes name, address and other information.</p>  \r<p class="indent1">(a)&nbsp;&nbsp;&nbsp;&nbsp; What condition is necessary for the binary search (binary chop) process to work correctly?</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="mark">(2)</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1">(b)&nbsp;&nbsp;&nbsp;&nbsp; Describe this process to find the position in the array of the record containing a given name.</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="mark">(5)</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1">(c)&nbsp;&nbsp;&nbsp;&nbsp; Why is this search method normally faster than a linear search?</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="indent2new answer-toggle">___________________________________________________________________</p>  \r<p class="mark">(2)</p>  \r<p class="mark">(Total 9 marks)</p></h5>', 'markscheme': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">&nbsp;</p>\r<p class="indent1 indentright m-t-0">(a)&nbsp;&nbsp;&nbsp;&nbsp; Array must be sorted (1), on the field being used as the search key (1)</p>  \r<p class="levelms">2</p>  \r<p class="indent1 indentright">(b)&nbsp;&nbsp;&nbsp;&nbsp; Description must include the following points: Find median record of array <b>(l) </b>Compare key field of record at median position with required search key, exit if found (1)<b> </b>If search key lower (i.e. required record in first half), discard second half, else discard first half (1)<b> </b>Repeat process (1) until either found, or no further division possible so record does not exist (1)</p>  \r<p class="levelms">5</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1 indentright">(c)&nbsp;&nbsp;&nbsp;&nbsp; On each iteration, half the possible matches are eliminated, compared with only one for the linear search (2)</p>  \r<p class="indent2new indentright" style=\'margin-top:0cm; margin-bottom:0cm\'>Linear search on average scans n/2 records, compared with log<sub class="xsmall">2</sub>n which is smaller “Looks at fewer records” without further explanation (1)</p>  \r<p class="levelms">2</p>  \r<p class="mark">[9]</p></h5>', 'examinerreport': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">Knowledge of sort procedures seems good, but the ability to express it with anything like the precision of language expected at A-level is not. In particular, far too many candidates treat file, record and field as interchangeable terms, which is unacceptable at this level.</p>  \r<p class="indent1new">For part (a), nearly all candidates pointed out that an array needed to be sorted for a binary chop search to work, but very few realised that, say, an array with ten fields could be sorted in ten different orders and only one would work - that in which the sort key was the field being searched.</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1new">For part (b), most scored reasonably well, although as usual descriptions were full of waffle. Candidates seemed to be trying to paraphrase an algorithm they had been taught - while formal algorithms are not in the syllabus for this paper, if a candidate wants to present an answer in pseudocode or even flowchart form it will receive full credit. A common mistake was to say that the search key was compared to “the middle record” (rarely the more accurate “key field of the median record”) and one half or the other discarded, ignoring the possibility that it might be matched enabling the search to end. Many candidates failed to indicate how the search could indicate failure if the desired key did not exist in the array. Another mistake is to describe the process by describing the progress of a search of specimen data - rarely adequate because it misses many of the things that can happen with different data, and does not bring out the iterative nature of the process because the list is so short.</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1new">In part (c), it was necessary to indicate something about the workings of both techniques to gain both marks (preferably referring back to part (b)) - the bald (and common) “it looks at fewer records” shows little understanding. Not many appreciated the significance of the word “normally” - a linear search is actually much faster than a binary chop in finding a key such as “aardvark”!</p></h5>', 'notes': '', 'resources': ''}, 'Q20S1B11': {'question': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">This question refers to the text file <span class="comp">image3.txt</span> and the subroutine <span class="comp">LoadAsciiImage</span></p>\r\n<p class="indent1new m-b-1">The first line of the text file <span class="comp">image3.txt</span> contains:</p>\r\n<p class="indent1new m-b-1"><span class="comp">Cat,59,25,A</span></p>\r\n<p class="indent1">(a)&emsp;&nbsp;Explain the effect of changing the first line to <span class="comp">Cat,25,59,A</span> and then calling <span class="comp">LoadAsciiImage</span></p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="mark">(2)</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1">(b)&emsp;&nbsp;Explain the effect of changing the first line to <span class="comp">Cat,59,59,A</span> and then calling <span class="comp">LoadAsciiImage</span></p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="mark">(2)</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1">(c)&emsp;&nbsp;Explain the effect of changing the first line to <span class="comp">Cat,59,10,A</span> and then calling <span class="comp">LoadAsciiImage</span></p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="indent2new answer-toggle">___________________________________________________________________</p>\r\n<p class="mark">(2)</p>\r\n<p class="mark">(Total 6 marks)</p></h5>', 'markscheme': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="questiona">(a)&emsp;&nbsp;<b>2 marks for AO2 (analyse)</b> </p>\r\n<p class="indent2new indentright">When the image is displayed/loaded it will not be the intended image</p>\r\n<p class="indent2new indentright m-t-0">// the pixels will be misaligned;</p>\r\n<p class="indent2new indentright m-t-0">As the line breaks will now be in the wrong places // image width is shorter but length is longer;</p>\r\n<p class="indent2new indentright m-t-0"><b>A.</b> there will be no error message / exception;</p>\r\n<p class="indent2new indentright"><b>Max 2</b></p>\r\n<p class="levelms">2</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1 indentright">(b)&emsp;&nbsp;<b>2 marks for AO2 (analyse)</b> </p>\r\n<p class="indent2new indentright">The image is now a larger dimension;</p>\r\n<p class="indent2new indentright m-t-0">There will not be enough data in the file;</p>\r\n<p class="indent2new indentright m-t-0">The bottom rows of the image will consist of dots;</p>\r\n<p class="indent2new indentright m-t-0">The code will cause an exception // &quot;<span class="comp">Error: Image data error</span>&quot; will be displayed;</p>\r\n<p class="indent2new indentright"><b>Max 2</b></p>\r\n<p class="levelms">2</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1 indentright">(c)&emsp;&nbsp;<b>2 marks for AO2 (analyse)</b> </p>\r\n<p class="indent2new indentright">The lower part of the picture will not be displayed/loaded // only the upper part of the picture will be displayed/loaded;</p>\r\n<p class="indent2new indentright m-t-0">Only the top 10 rows are displayed/loaded // the bottom 49 rows are not displayed/loaded // only the cat&#x2019;s head is displayed/loaded // the cat&#x2019;s body has been removed;</p>\r\n<p class="indent2new indentright"><b>Max 2</b></p>\r\n<p class="levelms">2</p>\r\n<p class="mark">[6]</p></h5>', 'examinerreport': '', 'notes': '', 'resources': ''}}
User: Now, the user will ask questions after this message. Use everything I gave you and the knowledge you have acquired, and from the notes you made, to answer their question in a very concise way that WILL score ALL marks. Just like the notes. For this, your answer will not have the same structure as the revision notes. Think of it as answering an exam question: short, consice, useful, scores ALL marks. Just like the exam questions provided to you, you will not leave your response in a 'notes' manner. You are just answering an exam question: which means it has to be very short unless explicitly specified by the user that it must be long and detailed. So, keep it short, concise, and only a couple of sentences that score ALL marks. Remember, it is an A-Level exam question and you will style it as such: incredibly concise sentences (essentially like bullet points but without the bullet points) that score marks. Most sentences won't even have commas, this does not mean you can't use them. Also do not repeat the question in your answer, just do it. Score all marks, assume how many marks there are based on the question if it is not provided to you. Imagine that for every sentence you make, you score a mark (for simpler questions), for high (>5 mark) questions that may differ.
In summary, you must:
* Answer very concisely. Kind of like bullet points but as a short para. Most of the time, a sentence, or point, will be a mark.
* Do not repeat the question at the start.
* Don't over-do your answer. Please. 1 mark (e.g., usually, 'What' questions) is like one very short sentence usually. Remember the summary from the notes? Your answer will essentially be like that for most questions but a bit (a bit!) more developed. Remember, this is just A-Levels. Use some of the exam questions that I provided as an example of how you should model your answers.
* When you're listing examples, don't list every example in the universe.
* Score all marks. Be helpful.
User: Write the notes you made, must score all marks. Include all exam questions and all definitions.
Assistant: