1 ACTUAL EXAM PAPER 2026 QUESTIONS
WITH SOLUTIONS GRADED A+
◉What is an integer give an example. Answer: a whole number that
can be negative or positive e.g -1 or 34
◉What is a real/float. Answer: a decimal number that is negative or
positiive
◉What is boolean. Answer: true or false
◉What is a character. Answer: A letter or a number
◉What is a string. Answer: anything enclosed by quotation marks
also known as a series of characters
◉What does the round function do. Answer: rounds the number to
the given value e.g - 6.56664 rounded to 2 decimal places is 6.6
,◉What does the trunc function do. Answer: the trunc function
rounds a real number to the nearest whole number it basically cuts
the decimal part off. 4.55 truncated is 4
◉What does exponentiation do. Answer: Raises to the power e.g 2^3
=8
◉what does integer division do. Answer: gives you the remainder.
div finds the whole number whilst mod finds the remainder
◉What does the len function do. Answer: returns the length of an
object or number of characters in a string
◉What does the string.substring function do. Answer: it returns the
portion of the string inclusive to the index e.g word = ' hello'
word.substring(index1,index2) = he
◉what does string.find do. Answer: if the variable is a string it
returns the index of the first string and if not it returns a -1
◉what does ord do. Answer: returns the integer value of a character
a-97
,◉what does chr do. Answer: returns the integer represented by a
character 97-a
◉What does concatenation do. Answer: it joins two strings together
◉how do you convert a string to an integer. Answer: int('string')
◉how do you convert a integer to a string. Answer: str(123)
◉how do you convert a string to a float. Answer: float('123.34')
◉how do you convert a float to a string. Answer: str(123.343)
◉What is a variable. Answer: an identifier given to a memory
location whos contents may be changed during the course of a
program they should always be given meaningful names
◉What is a constant. Answer: when the value of the variable never
changes and stays fixed/
◉Whats the advantage of using a constant. Answer: The advantage
of using a constant is that in a long complex program you reduce the
risk of accidently changing a variable or reuisng the same name you
, used for the constant. an example of this could be wanting to keep pi
= 3.14
◉What are the three basic programming constructs. Answer:
sequence, selection, iteration
◉What is a sequence. Answer: two or more statements following
one after the other
◉What is an assignment statement. Answer: A statement that sets a
variable to a specified value.
◉What is a selection statement used for. Answer: to select which
statement will be executed next depending on some conditions. This
conditions are mased using relational operators
◉What is a CASE statement. Answer: A way of writing complex
selection without lots of ELSE Ifs
◉What is AND, OR, NOT,. XOR. Answer: Boolean operators
◉What is XOR. Answer: it means that its either a or b but never both