Revision notes AQA Flashcards Preview

Computer Science IGCSE > Revision notes AQA > Flashcards

Flashcards in Revision notes AQA Deck (51)
Loading flashcards...
1

1  In mathematics which of the following are integers:
    8    5    103    –1.33    1¾    98    3.14    1500.45    –935  (7 marks)

8  5  103  98  –935

2

 What is a real data type?

A real data type contains numeric data in a decimal form. It is used in
situations where more accurate information is required than an integer
(a whole number) can provide.

3

 Give two reasons why a programmer would wish to use an integer  
data type rather than a real data type.

Storage: Real data takes up more memory than integer data; The
number has decimals.

Processing speed: Calculations using real numbers takes longer than
using whole numbers held as integers.

4

 Consider the following sentence and write it as a Boolean:  (4 marks)
    When the door is open and it is cold outside I have to wear my coat.

If (“door is open”) AND (“is cold outside”) then “wear coat”
  or
  If door=1 AND cold=1 then coat

5

 In programming what is a ‘string’?

 A string, or text, data type is capable of holding any alphanumeric
character (letters, numbers or symbols)
. It is also capable of storing
non-printable characters, such as carriage returns, punctuation
characters and spaces
. The data within a string data type can consist of
a combination of letters, numbers and symbols.

6

What is a ‘variable’ in programming?  (1 mark)

 Variables are data entities whose values can be altered when a program
is compiled
. As their name implies, their values vary.

7

 What does the following code do?  (3 marks)
   If (($wet && $cold) || ($poor && $hungry)) {
        Print “I’m sad!”;
    }

The ‘print’ statement is executed if wet AND cold are both true OR if
poor AND hungry are both true.

8

What is the study of data structures about?  (1 mark)

 The study of data structures is about organising data so that it is
suitable for computer processing.

9

 Explain the term ‘concurrent’.

 ‘Concurrent’ means happening at the same time as something else.

10

Explain, using an example, the term ‘one-dimensional array’.

A one-dimensional array is a list of variables. To create an array, you must
first define an array variable of the desired type. One-dimensional arrays
in Python and PHP allow a list of items to be stored with the capability of
accessing each item by pointing to its location within the array
, for example:
  carMakers = [“Ford”, “Land Rover”,
“Vauxhall”, “Nissan”, “Toyota”]
  or
  Vauxhall, Nissan, Toyota]; ?>

11

Explain the difference between one- and two-dimensional arrays.  (2 marks)

Two-dimensional arrays are nothing more than an array of arrays, in
other words an array in one row and another in the next row.

12

Why is the first element in an array usually [0] not [1]?  (2 marks)

It is common practice within programming for the first element
within an array to be given an index of zero rather than 1, because
0 is considered by most mathematicians to be a real number
between –1 and 1
and so in languages where arrays are positively
indexed, zero is the first number
(negative indexes are not possible).

13

 Look at the following array.
    carMakers = [“Ford”, “Land Rover”, “Vauxhall”,  
“Nissan”, “Toyota”]
    Use a coded solution to identify ‘Toyota’ as the car_name.  (2 marks)

  $car_name = carMakers[4];
  ?>

14

Program Flow Control

Explain with simple examples the basic building blocks of coded solutions.  (3 marks)

The basic building blocks are: sequence, selection and looping.

  •   Sequence example: Set, Input, and Output statements
  •   Selection example: Conditional, if and if–else statements
  •   Looping example: Iteration, While and Do–While statements

15

Represent the following code as a simple flowchart.  (4 marks)
  if condition is true
  then
      perform instructions in Block1
  else
      perform instructions in Block2
  endif

16

 Design a simple flowchart to show the actions of a single move in a snakes  
and ladders game.

17

 What is the purpose of procedures and functions in programming  
languages?

Procedures and functions allow the repetition of certain sections of a
program or calculation many times.
They also assist in the modulation
of code
by allowing themselves to be called from any point within a
program solution.

18

 What is the main difference between a procedure and a function?
  (2 marks)

 A function carries out actions and returns a value to the main
program
. A procedure carries out actions without returning a value.

19

scope of variables, constant, functions, and procedure

What is global scope?

A variable that can be accessed from anywhere within the project that
contains its declaration as well as from other projects that refer to that
initial project.

20

 In terms of scope, briefly describe what is meant by:  (2 marks)
a)  local variable
b)  global variable.

The scope of a local variable is the procedure in which it is declared.
The scope of a global variable is the whole program.

21

What are the three types of error that computer programmers encounter  
when writing software?  (3 marks)

  • Syntax errors
  •   Run-time errors
  •   Logic errors

22

 What is meant by a ‘format error’ and what is its correct name?  (4 marks)

 The correct name is ‘syntax error’ and it relates to the grammar rules of
the programming language used. These errors are usually due to using the
wrong case, placing punctuation in positions where it should not exist or
failing to insert punctuation where it should be placed within the code.

23

State what happens when programming statements are written  
in the wrong order and state the name for this type of error.  (3 marks)

 Called ‘run-time errors’, these errors occur when the program instructs
the computer to carry out an operation that it is either not designed
to do or slow to do. It causes a crash or slow running of the code.

24

 Which type of programming error is the hardest to detect and why?  (3 marks)

Logic errors are the most difficult kind of errors to detect and rectify.
The program runs successfully but produces incorrect results.

25

 What is the name given to the testing of software at the planning  
and flowchart stage?  (2 marks)

Dry-run testing is usually carried out on the algorithm, written in
pseudo-code or as part of a flowchart and before the program code is
written.

26

  What is a ‘trace table’?  (2 marks)

 A ‘trace table’ is a technique used to test an algorithm to see if logic
errors occur while it is being processed. Each column contains a
variable and each row displays the numerical inputs into the algorithm
and the resultant values of the variables.

27

 What is correcting errors in a program called?  (1 mark)
a)  compiling
b)  debugging
c)  grinding
d)  interpreting.

b

28

 State the four essential parts of a computer system.  (4 marks)

 Input, output, process and storage.

29

 Name three input devices.  (3 marks)

Any 3 of: a keyboard, a mouse, a scanner, a microphone.

30

 State three output devices.  (3 marks)

 Monitor, speakers, printer.