Easy1 markShort Answer
AQA GCSE · Question 09.4 · Programming
Write a pseudo-code statement that updates the antMan record to show that the film is currently being shown at the cinema.
Write a pseudo-code statement that updates the antMan record to show that the film is currently being shown at the cinema.
How to approach this question
1. Identify the record variable for the film Ant-Man, which is `antMan`.
2. Identify the field that represents whether the film is being shown, which is `beingShown`.
3. This field is a Boolean. To show the film is currently being shown, this field should be set to `True`.
4. Use dot notation to access the field (`antMan.beingShown`).
5. Use the assignment operator (`←`) to assign the new value.
6. The complete statement is `antMan.beingShown ← True`.
Full Answer
antMan.beingShown ← True
The task is to update a specific field within a record. The record variable is `antMan`. The field to be updated is `beingShown`. The new value should indicate that the film is now showing, so the Boolean value `True` should be assigned. The syntax for accessing a field in a record is `recordName.fieldName`. The pseudo-code assignment operator is `←`. Combining these elements gives the correct statement: `antMan.beingShown ← True`.
Common mistakes
✗ Using incorrect syntax, e.g., `antMan(beingShown) ← True`.\n✗ Assigning the wrong value, e.g., a string `"True"` instead of the Boolean `True`.\n✗ Updating the wrong record, e.g., `hulk.beingShown`.
Practice the full AQA GCSE Computer Science Paper 1 Python
31 questions · hints · full answers · grading
More questions from this exam
Q01.1Figure 1 shows an algorithm, represented using pseudo-code, which assigns a different value to fo...EasyQ01.2The variable `x` is assigned a value using the statement:
`x ← LEN(state)`
Using Figure 1, what ...EasyQ01.3What is the result of concatenating the contents of the variables `city` and `landmark` in Figure 1?EasyQ01.5The subroutine `POSITION` finds the first position of a character in a string.
For example, `POSI...EasyQ02.1Figure 2 shows an algorithm that uses integer division which has been represented using pseudo-co...Easy
Expert