AQA A-Level Computer Science 7517
Fundamentals of Programming
Fundamentals of Data Structures
Fundamentals of Algorithms
Theory of Computation
Fundamentals of Data Representation
Fundamentals of Computer Systems
Fundamentals of Computer Organisation and Architecture
Fundamentals of Communication and Networking
Consequences of Uses of Computing
Systematic Approach to Problem Solving
Fundamentals of Databases
Big Data
Fundamentals of Programming
Programming concepts and program structure
- 3 things to know
- Paper 1
Overview
Recall questions on the three combining principles of imperative languages, and on declaration, assignment, selection, iteration and subroutines as statement types.
What you need to know
Answer each one before you reveal it.
Define indefinite iteration.
You need to keep asking the user for a password until the correct one is entered. Which position of the condition suits this, and why?
Questions from this subtopic
Each one with the model answer underneath.
- 1
What are the three combining principles on which all imperative programming languages are built?
Model answer
Sequence, in which statements are carried out one after another in the order written; iteration or repetition, in which a block of statements is carried out repeatedly; and selection or choice, in which a block is carried out only when a condition is met. Every imperative program is built by combining these three.
- 2
What does a variable declaration do?
Model answer
It introduces an identifier and states its data type, so that memory is reserved for it and the translator knows how to interpret and check its use. In some languages a variable is declared explicitly before use; in others it is created implicitly the first time it is assigned to.
- 3
What does a constant declaration do?
Model answer
It gives a name to a fixed value that is set when the program is written and cannot be changed while the program runs, for example CONST VAT = 0.2. Any later attempt to assign to it is rejected by the translator.
- 4
Explain what an assignment statement does.
Model answer
It stores a value in a variable. The expression on the right-hand side is evaluated first and the resulting value is copied into the variable named on the left, overwriting whatever it held before. This is why count = count + 1 is perfectly sensible as an assignment even though it is nonsense as an equation.
- 5
What does an iteration statement do?
Model answer
It causes a block of statements to be executed more than once, either a set number of times or until a condition is met, without that block having to be written out repeatedly.
- 6
What does a selection statement do?
Model answer
It chooses between alternative blocks of statements according to whether a condition is True or False, using structures such as IF, IF...ELSE, or a CASE/SWITCH statement that selects one branch from many according to the value of an expression.
Other ways to work this
The same content, four other ways.
What is inside Levo
Six ways to work the same material.
Every question in Fundamentals of Programming, on a schedule.
Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.