String Methods: Length (1 mark)
Identify the operation that would be used to find the number of characters in a string variable ‘username’.
String Methods: Length (1 mark) Read More »
Identify the operation that would be used to find the number of characters in a string variable ‘username’.
String Methods: Length (1 mark) Read More »
Explain why it is important for a program to validate user input from the keyboard.
Validating Inputs (2 marks) Read More »
Identify what is meant by the term “input” in the context of computer systems.
What is an Input? (1 mark) Read More »
Define a record ‘Student’ with the following fields: name (string), age (integer), and grade (character).
Describe how a two-dimensional array differs from a one-dimensional array.
1D vs 2D Arrays (3 marks) Read More »
Given the following one-dimensional array of integers: numbers
1D Array Index (2 marks) Read More »
Explain what an array is in the context of data structures.
What is an Array (1 mark) Read More »
A program includes the following Boolean variables to control its flow: userLoggedIn isAdmin hasPermissions Write a Boolean expression that will be evaluated to True to allow access to the admin panel, considering that access should only be granted if the user is logged in and is either an admin or has permissions.
Construct a Boolean Expression (1 mark) Read More »
Consider the following variables: a = True b = False c = True What will be the result of the expression (NOT a) OR (b AND c)?
Evaluating Boolean Expressions (2 mark) Read More »
Write the output of the following Boolean expression: NOT (True AND False)
Evaluating a Boolean Expression (1 mark) Read More »
Notifications