Every value a program stores has a data type, and choosing the right one keeps your code correct and efficient. In this lesson we meet the five basic data types, learn the difference between a variable and a constant, and practise declaring and assigning values using Cambridge pseudocode.
1. A program needs to store the price of an item in pounds and pence, for example 4.99. Which data type is the most suitable?
2. Which statement about a constant in Cambridge pseudocode is correct?
3. Which line correctly assigns the value zero to a variable called Total in Cambridge pseudocode?
4. Consider the code: DECLARE Grade : CHAR followed by Grade <- 'B'. Which value has been stored and why is it valid?
Practise real exam questions on this
Type your answer, see your mark against the mark scheme in seconds. Free, 5 a day.
Start practising →
Teaching this topic?
Mark your whole class's answers and see who's stuck, for £19 a month.
See the class plan →
Free revision content. Multiple-choice answers are marked instantly. Written answers are marked by AI on /free-mark.