Validation vs Verification (3 marks)
Explain the difference between data validation and verification.
Validation vs Verification (3 marks) Read More »
Explain the difference between data validation and verification.
Validation vs Verification (3 marks) Read More »
Give two examples of data validation techniques.
Data Validation Techniques (2 marks) Read More »
What is the purpose of data validation in a computer program?
Data Validation (2 marks) Read More »
Describe what each of the following string handling functions does, and write a line of pseudocode for each that demonstrates its use: len(string) mid(string, start, length) instring(substring, string)
String Handling Functions (4 marks) Read More »
Given an array scores of integers representing the scores in a game, write a section of pseudocode that counts the number of times a “rogue value” of -1 appears in the array and outputs this count.
Understanding Count and Rogue Values (3 marks) Read More »
Explain the difference between local and global variables. Provide an example of each using pseudocode.
Local and Global Variables (2 marks) Read More »
Below is an algorithm in pseudocode that is intended to find and output the largest number in a list called numberList. The list is populated with integer values. Declare largestNumber as integer set largestNumber = numberList[1] for i = 2 to len(numberList) if numberList[i] > largestNumber then set largestNumber = numberList[i] end if next i
Interpreting an Algorithm (3 marks) Read More »
Design an algorithm in pseudocode that calculates the factorial of a given non-negative integer n using iteration. The factorial (symbol: !) of a number is the product of all positive integers less than or equal to the number. For example, 5!=5×4×3×2×1=120.
Mathematical Operations and Counts (5 marks) Read More »
Write an algorithm in pseudocode to check if a string entered by a user is a palindrome (a word that reads the same backward as forward). Your algorithm should use a subroutine to reverse the string and compare it with the original string to determine if it is a palindrome. Include appropriate self-documenting identifiers.
Subroutines and String Handling (6 marks) Read More »
Describe a situation where a low-level language would be more appropriate than a high-level language.
Application of Low-Level Language (2 marks) Read More »