Chapter 7 - Programming Flashcards

1
Q

Algorithms

A

Sets of rules that define a solution to a problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Pseudocode

A

A structured form of English used to define the steps needed to solve a problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Machine code

A

A stream of binary code that represent instructions that are to be carried out - specific to computer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Low-level code

A

Works at the level of computer hardware

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Assembly language

A

Uses mnemonics to represent instructions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

High-level languages

A

Commands may represent several machine code instructions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Compiler

A

Converts whole code into machine code before running it. Source code runs independently to object code so compiler not needed and difficult to modify

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

IDE

A

Integrated development environment includes source code editors, debuggers etc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Sequence

A

The path through a program that the computer follows in order

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Selection

A

Path through program decided by condition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Iteration

A

Set of instructions repeated several times

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Variable

A

A named storage reserved in memory for data to be used in a program. It can be updated by the program and has no value at design time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Constant

A

A place reserved in memory for data to be used in a program. It cannot be changed by the program, only at the editing stage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Array

A

A set of variables with the same name and an index number to identify the different variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Syntax errors

A

Errors in the use of language rules e.g. undeclared variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Logical errors

A

Errors as a result of flawed logic e.g. infinite loops. Error does not prevent the program running but does not produce expected output

17
Q

Why can testing never be complete? (4)

A

1) Complex software
2) Expensive
3) Time consuming
4) Lots of pathways

18
Q

Where are binary bit patterns of low-level code decoded?

A

Processor’s logic circuits

19
Q

Why is writing programs in machine code difficult and time consuming? (2)

A

1) Each operation has to be defined

2) Each instruction is just one operation

20
Q

What is the operator/ opcode?

A

Instruction - tells processor what to do

21
Q

What is the operand?

A

Data part of instruction

22
Q

What is an assembler?

A

Software that converts mnemonics from assembly code to machine code - precise and direct but difficult to code and limited commands

23
Q

What does an interpreter do?

A

Converts high-level code one instruction at a time, running each before translating the next. Source code is needed to run program so code will run on any machine but slower and easy to modify

24
Q

What can an IDE include? (4)

A

1) Source code editor - easier to code - more accurate
2) Debugger - less errors + time on improving
3) Translator
4) Autocomplete code - save time

25
Q

What can happen with logical errors? (3)

A

1) Programs do not complete
2) Memory filled
3) Incorrect output

26
Q

Why do we need testing?

A

To discover errors and ensure software conforms to specifications

27
Q

What is the size of a string, integer, real and boolean variable?

A

String - 5 bytes
Integer - 2-4 bytes
Real - 4-8 bytes
Boolean - 1 bit