Most Appropriate data type for: StudentName, Points, LetterSent (3) - AnswersString
Integer
Boolean
Write an SQL statement to select StudentName field, for all record that have Negative points (3) -
AnswersSELECT StudentName
FROM conduct
WHERE Points < 0
State the wildcard used in SQL to show all fields from a table (1) - Answers*
Write an algorithm that will identify whether the data in studentdata array shows if a letter has been
sent home or not for a student. Should output "sent" or "not sent" (4) - Answersif studentdata[3] ==
"TRUE" then:
print "sent"
else:
print "not sent"
end if
Identify three basic programming constructs (3) - AnswersSequence
Iteration
Selection
Describe what is meant by a variable (2) - AnswersA name for a memory location. Used to store
data/value (assigned). That can be changed while program running.
And Gate table
Or Gate table
Not gate table
for all values - AnswersAND: 0 0 = 0, 0 1 = 0, 1 0 = 0, 1 1 = 1.
OR: 0 0 = 0, 0 1 = 1, 1 0 = 1, 1 1 = 1.
NOT: 0 = 1, 1 = 0
, Write an algorithm that: inputs title and year of a book, uses the function Librarycode to work out a
book code, permanently stores the new book code to text file bookcodes.txt (6) - Answerstitle =
input("enter title")
year = input ("enter year")
code = librarycode(title, year)
myFile = openWrite("bookcodes.txt")
myFile.writeLine(code)
MyFile.close()
Describe one difference between a function and a procedure.(2) - AnswersFunction returns a value
Procedure does not return a value
Describe two benefits to a programmer of using sub programs. (4) - AnswersBreaks down problem,
making it easier to test, each subroutine tested separately
Reuse code, quicker to develop, build of existing work
Avoid repetition of code, makes program shorter, subprogram called instead of copying/pasting, quicker
to develop new programs
What does merge sort do? (4) - AnswersList split into individual elements
Merge individual elements into sorted lists of size 2
Merge lists of size 2 into sorted lists of 4
Merge lists of 4 into final sorted list
Explain one advantage of a merge sort compared to a bubble sort. (2) - AnswersFaster/quicker, for large
lists that are more unordered
Has a consistent running time, doesnt depend on how ordered original list is
Compare the use of ASCII and Extended ASCII to represent characters (2) - AnswersExtended ASCII uses
more bits // ASCII uses fewer
bits
Extended ASCII can represent more characters //
ASCII can represent fewer characters
... by example (e.g. extended ASCII can represent