Question 1
Part 1(a) — solution
- DataArray = [] #15 strings
Visual Basic (VB.NET)
Dim DataArray(14) As String
Python
DataArray = [] #15 strings
Mark points
- DataArray = [] #15 strings
Part 1(b) — solution
- Procedure header (and end)
- Taking 15 strings as input
- … converting to lower case
- … storing in array
Visual Basic (VB.NET)
Sub CreateArray()
For x = 0 To 14
Console.WriteLine("Enter a word ")
DataArray(x) = Console.ReadLine().ToLower()
Next
End Sub
Python
def CreateArray():
for x in range(15):
DataArray.append(input("Enter a word ").lower())
Mark points
- Procedure header (and end)
- Taking 15 strings as input
- … converting to lower case
- … storing in array
Part 1(c) — solution
- Procedure header (and end) and outputting all data
- … on one line with a space between each element
Visual Basic (VB.NET)
Sub OutputArray()
Dim StringOutput As String = ""
For x = 0 To 14
StringOutput = StringOutput + " " + DataArray(x)
Next
Console.WriteLine(StringOutput)
End Sub
Python
def OutputArray():
StringOutput = ""
for x in range(15):
StringOutput = StringOutput + " " + DataArray[x]
print(StringOutput)
Mark points
- Procedure header (and end) and outputting all data
- … on one line with a space between each element
Part 1(d)(i) — solution
Visual Basic (VB.NET)
CreateArray()
OutputArray()
Python
CreateArray()
OutputArray()
Mark points
- Include the ideas shown in the solution above.
Part 1(d)(ii) — solution
Mark points
- Include the ideas shown in the solution above.
Part 1(e) — solution
- Procedure header (and end) taking string as input and converting to lower
- Looping through all elements in the array
- … comparing to input
- … counting number of times it occurs
- Outputting final count
Visual Basic (VB.NET)
Sub FindWords()
Console.WriteLine("Enter the word you want to find")
Dim WordFind As String = Console.ReadLine().ToLower()
Dim Counter As Integer = 0
For x = 0 To 14
If DataArray(x) = WordFind Then
Counter = Counter + 1
End If
Next
Console.WriteLine("It was found " & Counter & " times")
End Sub
Python
def FindWords():
WordFind = input("Enter the word you want to find ").lower()
Counter = 0
for x in range(15):
if(DataArray[x] == WordFind):
Counter = Counter + 1
print("It was found ", Counter, " times")
Mark points
- Procedure header (and end) taking string as input and converting to lower
- Looping through all elements in the array
- … comparing to input
- … counting number of times it occurs
- Outputting final count
Part 1(f)(i) — solution
- Procedure header (and end) and iterating through each element (first loop)
- Inner loop
- Stopping the loop when in order (any method)
- Comparing by length …
- … and swapping correctly
Visual Basic (VB.NET)
Sub SortLength()
Dim Temp As String
Dim Swap As Boolean = True
Dim Count As Integer = 0
While Count < 15 And Swap = True
Swap = False
For y = 0 To 13
If DataArray(y).Length > DataArray(y + 1).Length Then
Temp = DataArray(y)
DataArray(y) = DataArray(y + 1)
DataArray(y + 1) = Temp
Swap = True
End If
Next
Count = Count + 1
End While
End Sub
University Press & Assessment 2026 Page 13 of 46
Trace ID: PC-BEC0C4D104
Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable.
Licensed for hosting on papacambridge.com only.
PapaCambridge
9618/43 Mark Scheme June · papacambridge.com
2026 | Source: papacambridge.com 9618/43 Mark Scheme June 2026
Downloaded from PapaCambridge - https://papacambridge.com/
9618/43 Cambridge International AS & A Level – Mark Scheme May/June 2026
Guidance
Python
def SortLength():
Swap = True
Count = 0
while(Count < 14 and Swap):
Swap = False
for y in range(14):
if(len(DataArray[y]) > len(DataArray[y+1])):
DataArray[y], DataArray[y+1] = DataArray[y+1], DataArray[y]
Swap = True
Count = Count + 1
Mark points
- Procedure header (and end) and iterating through each element (first loop)
- Inner loop
- Stopping the loop when in order (any method)
- Comparing by length …
- … and swapping correctly
Part 1(f)(ii) — solution
Visual Basic (VB.NET)
FindWords()
SortLength()
OutputArray()
Python
FindWords()
SortLength()
OutputArray()
Mark points
- Include the ideas shown in the solution above.
Part 1(f)(iii) — solution
Mark points
- Include the ideas shown in the solution above.