Font size
WorksheetsIGCSE Pseudocode Practice
Total questions: 119
Worksheet time: 3570secs
How are lines indented in pseudocode to indicate containment within a previous statement?
Two spaces
Three spaces
Four spaces
Five spaces
If a statement in pseudocode does not fit on one line, how are continuation lines indented?
One space
Two spaces
Three spaces
Four spaces
In pseudocode, what indentation is used for THEN and ELSE clauses of an IF statement?
One space
Two spaces
Three spaces
Four spaces
What is the indentation style for cases in CASE statements in pseudocode?
One space
Two spaces
Three spaces
Four spaces
Continuation lines in pseudocode are indented by (a) spaces from the margin.
How are keywords represented in the pseudocode as per the syllabus?
Lower case
Mixed case
Upper case
Italics
What is the case convention for identifiers in pseudocode?
Lower case
Mixed case
Upper case
Italics
How is a comment indicated in pseudocode?
One forward slash (/)
Two forward slashes (//)
Hash symbol (#)
Double asterisks (**)
In pseudocode, keywords are written in (a) case.
Identifiers in pseudocode follow a (a) case convention.
Which keyword in pseudocode is used for a whole number?
INTEGER
REAL
CHAR
STRING
How is a real number represented in pseudocode?
Without a decimal point
With at least one digit on either side of the decimal point
As a fraction
In exponential form
In pseudocode, how is a single character denoted?
With double quotes
With single quotes
Without quotes
With brackets
What denotes a string in pseudocode?
Single quotes
Double quotes
Parentheses
Brackets
A single character in pseudocode is delimited by (a) quotes.
Boolean literals in pseudocode are represented as (a) or FALSE.
In pseudocode, TRUE and FALSE are examples of (a) literals.
The pseudocode representation of a fractional number uses the data type (a) .
A (a) is a data type in pseudocode used for single characters.
In pseudocode, identifiers must start with what type of letter?
A lowercase letter
A capital letter
A digit
An underscore
Which of the following is a valid identifier in pseudocode?
2ndPlayer
_totalScore
MaxHeight
floatNumber
What should identifiers in pseudocode not include?
Digits
Accented letters
Capital letters
Lowercase letters
Which of the following is the correct way to declare a boolean variable named 'IsActive' in pseudocode?
DECLARE IsActive: BOOLEAN
BOOLEAN IsActive DECLARE
DECLARE BOOLEAN IsActive
IsActive: DECLARE BOOLEAN
Identifiers in pseudocode should start with a (a) letter.
Using (a) as identifier names in pseudocode is not allowed.
Which of the following is the correct way to declare an integer variable named 'ItemCount' in pseudocode?
INTEGER DECLARE ItemCount
DECLARE ItemCount: INTEGER
DECLARE INTEGER ItemCount
ItemCount: DECLARE INTEGER
How do you correctly declare a real number variable named 'AverageScore' in pseudocode?
REAL AverageScore DECLARE
DECLARE REAL AverageScore
DECLARE AverageScore: REAL
AverageScore: DECLARE REAL
Which is the correct way to declare a string variable named 'UserName' in pseudocode?
STRING UserName DECLARE
DECLARE UserName: STRING
DECLARE STRING UserName
UserName: DECLARE STRING
How is a constant with the identifier MaxSize and a value of 100 correctly declared in pseudocode?
CONSTANT MaxSize = 100
CONSTANT MaxSize ← 100
MaxSize CONSTANT = 100
MaxSize ← CONSTANT 100
Choose the correct declaration for a constant named MinTemperature with a value of -5.0 in pseudocode.
CONSTANT MinTemperature = -5.0
MinTemperature CONSTANT ← -5.0
CONSTANT MinTemperature ← -5.0
-5.0 ← CONSTANT MinTemperature
What is the proper way to declare a constant DefaultMessage with the string value "Hello" in pseudocode?
CONSTANT DefaultMessage = "Hello"
DefaultMessage → CONSTANT "Hello"
"Hello" → CONSTANT DefaultMessage
CONSTANT DefaultMessage ← "Hello"
How would you correctly declare a boolean constant IsEnabled with the value TRUE in pseudocode?
CONSTANT IsEnabled = TRUE
CONSTANT IsEnabled ← TRUE
IsEnabled CONSTANT = TRUE
TRUE → CONSTANT IsEnabled
In pseudocode, which of the following correctly declares a constant Pi with the value 3.14?
Pi = CONSTANT 3.14
CONSTANT Pi = 3.14
Pi → CONSTANT 3.14
CONSTANT Pi ← 3.14
To declare a constant in pseudocode, use the format CONSTANT (a) ? value.
What is the correct syntax for assigning the value 10 to a variable named Score in pseudocode?
Score = 10
Score → 10
Score ← 10
10 ← Score
How would you represent assigning the sum of two variables A and B to a variable Total in pseudocode?
Total = A + B
Total ← A + B
A + B → Total
A + B ← Total
Choose the correct way to assign the boolean value FALSE to a variable IsActive in pseudocode.
IsActive = FALSE
IsActive ← FALSE
IsActive → FALSE
FALSE ← IsActive
In pseudocode, how do you assign a character 'a' to a variable FirstChar?
FirstChar = 'a'
FirstChar ← 'a'
FirstChar → 'a'
'a' → FirstChar
What is the correct format to assign the result of a multiplication operation (5 * 3) to a variable Product?
Product = 5 * 3
Product →5 * 3
Product←5 * 3
5 * 3 → Product
Which of the following is the correct way to declare a one-dimensional array of integers with 10 elements in pseudocode?
DECLARE Numbers : ARRAY[1:10] OF INTEGER
DECLARE Numbers : INTEGER[1:10]
DECLARE Numbers[1:10] OF INTEGER
INTEGER Numbers : ARRAY[1:10]
How do you declare a two-dimensional array of characters with 3 rows and 3 columns in pseudocode?
DECLARE Grid : CHAR[1:3, 1:3]
DECLARE Grid : ARRAY[1:3, 1:3] OF CHAR
DECLARE CHAR Grid[1:3, 1:3]
CHAR Grid : ARRAY[1:3, 1:3]
What is the correct syntax to assign the value 'X' to the second row and third column of a 2D array GameBoard in pseudocode?
GameBoard[2, 3] = 'X'
GameBoard[2, 3] → 'X'
GameBoard[2, 3] ← 'X'
'X' → GameBoard[2, 3]
Which pseudocode line correctly increments the value of the tenth element in an array Scores by 5?
Scores[10] = Scores[10] + 5
Scores[10] → Scores[10] + 5
Scores[10] ← Scores[10] + 5
Scores[10] + 5 → Scores[10]
To declare a one-dimensional array of strings with 25 elements, the pseudocode is DECLARE ArrayName : ARRAY[1: (a) ] OF STRING.
Which of the following is the correct way to input a value into a variable named Age in pseudocode?
INPUT Age
READ Age
GET Age
ENTER Age
How do you correctly output the value of a variable named TotalSales in pseudocode?
OUTPUT TotalSales
PRINT TotalSales
DISPLAY TotalSales
SHOW TotalSales
What is the correct format to output a string followed by the value of a variable Score in pseudocode?
OUTPUT "Your score is ", Score
PRINT "Your score is ", Score
DISPLAY "Your score is " + Score
SHOW "Your score is " & Score
Choose the correct pseudocode statement for inputting a value into an array element Numbers[5].
READ Numbers[5]
INPUT Numbers[5]
GET Numbers[5]
ACCEPT Numbers[5]
In pseudocode, how would you output a message and the values of two variables Name and Age?
SHOW "Name: " & Name & ", Age: " & Age
DISPLAY "Name: " + Name + ", Age: " + Age
PRINT "Name: ", Name, ", Age: ", Age
OUTPUT "Name: ", Name, ", Age: ", Age
The pseudocode command to display the contents of a variable Result is (a) Result.
The correct way to output the variables FirstName and LastName in pseudocode is: (a) "Name: ", FirstName, LastName.
The expression A (a) B in pseudocode represents multiplication of A and B.
To raise a number X to the power of 3 in pseudocode, write X (a) 3.
In pseudocode, the remainder of division is obtained using the (a) operator.
In pseudocode, to check if two values are equal, the (a) operator is used.
The operator for 'greater than' in pseudocode is represented by (a) .
To combine two Boolean conditions using the logical 'or', the (a) operator is used.
The pseudocode for checking if a variable Num is not equal to 5 is Num (a) 5.
In pseudocode, negating a Boolean expression is done using the (a) operator.
To find the length of a string in pseudocode, use the (a) function.
The pseudocode function UCASE converts a string or character to (a) case.
SUBSTRING("Planning", 3, 4) will return the substring (a) from the string "Planning".
In pseudocode, ROUND(Value, 2) will round Value to (a) decimal places.
To generate a random real number in the range of 0 to 1 in pseudocode, use the (a) function.
In pseudocode, an IF statement is closed with the keyword (a) .
To add a condition that executes when the IF condition is false, use an (a) clause.
Nested IF statements in pseudocode should continue the indentation of (a) spaces.
An IF statement in pseudocode that checks if Temp is less than 0 would start with IF Temp (a) 0 THEN.
In a complex decision-making process, pseudocode may require the use of multiple (a) IF statements.
In pseudocode, a CASE statement ends with the keyword (a) .
A CASE statement in pseudocode allows for the execution of code based on the value of a(n) (a) .
In a CASE statement, if no defined cases are applicable, the (a) clause's statement is executed.
Each case clause in a CASE statement is indented by (a) spaces.
For simple decisions based on a variable's specific values, use a (a) statement in pseudocode.
In pseudocode, a count-controlled loop starts with FOR and ends with NEXT (a) .
A FOR loop's range is specified from value1 (a) value2.
In pseudocode, FOR I ← 1 TO 5 STEP (a) is used to specify a specific step increment in a FOR loop.
The loop type that checks its condition after executing its statements is the REPEAT (a) loop.
In a REPEAT loop, if the condition evaluates to (a) , the loop terminates.
In a REPEAT loop, the loop terminates if the condition evaluates to (a) .
A (a) loop checks its condition at the beginning of each iteration.
The REPEAT (a) loop ensures that the statements inside it are executed at least once.
In pseudocode, a loop that runs as long as a condition is TRUE is started with the keyword (a) .
A REPEAT loop in pseudocode is closed with the keyword (a) followed by a condition.
