Programming Techniques- S11 Flashcards

1
Q

Algorithm

A

is a set of rules or a sequence of steps specifying how to solve a problem.

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

Pseudocode

A

tool for developing algorithms, and is between English and program statements.

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

Indentation

A

Statements shifted to the right that are contained within a block

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

Initialisation

A

setting variables to appropriate values at the beginning of a program to ensure there is not a value already assigned to it.

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

Variables

A

A name in memory used to store a value with can change during execution.

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

Constant Variables

A

a value that cannot be altered by the program during normal execution. E.g pi=3.14159265

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

Why are Constant Variables used

A

to make the programs easier to understand, easier to change the value of variable throughout the program and to make sure a programmer doesn’t accidentally change its value.`

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

Give Data Types

A

Integer, String, Float, Boolean, Character, Date

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

Sequences

A

Two or more statements following each other.

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

Selection

A

When there is a condition that needs to be met in order for certain statements to be executed.

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

Pseudocode for a switch case

A
switch entry: 
case “A”: print(“You selected A”) 
case “B”:1 print(“You selected B”) 
default: print(“Unrecognised selection”)
endswitch
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Iteration

A

An iteration is a repetition so a loop.

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

Give examples of Iteration

A

While… End While
For count… Next count
for i… next i
Repeat… until

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

Subroutines

A

a named block of code which performs a specific task within the program.

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

Subroutines are good to use because

A
Easier to understand
Easier to debug
Can be reused
Each module can be tested independently
Work is divided between team, so saves time
Each member can work on their expertise
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Function

A

A named subroutine that returns a value, called inline, and performs a specific task.

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

Procedure

A

A named subroutine that performs a specific task but does not return a value.

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

parameter by reference

A

a parameter can be changed in the subroutine and will then change the value of variable which has been passed in. (only used in procedures)

19
Q

parameter by value

A

is when the value is passed to subroutine and is treated as a local variable. Changing the parameter inside the subroutine does not affect the value outside the subroutine.

20
Q

Global variable

A

are used in the main program and can be used anywhere in the program including within subroutines.

21
Q

Local variable

A

are variables used in a subroutine and are self-contained.

22
Q

Modular design/programming

A

When the program is divided into separate self-contained modules or tasks, which can be written and tested individually. Modules can be subdivided further into smaller modules.

23
Q

Advantages of modular design

A
Easy to understand
Can be reused
Reduced development time
Modules can be shared between programmers
Easier to maintain/debug
24
Q

IDE (Integrated Development Environment)

A

A set of tools put all in one program and helps you write code more easily.

25
Q

Give some examples of what IDE does

A

debugger, breakpoints, watch, stepper, crash dump, search for functions, compiles, autofils functions

26
Q

Whats a breakpoint

A

program stops on that line and you can check the value assigned to a variable

27
Q

Whats a watch

A

so value of a variable is displayed when it changes

28
Q

Whats a stepper

A

one line is performed at a time.

29
Q

Whats a crash dump

A

when the program stops it tells you the data and the state everything is in

30
Q

Test data

A

Testing is to try and uncover undetected errors. Test data needs test the outcome for any user input. Stat what test to use, the purpose, the expected result and actual result.

31
Q

Normal data

A

data is within the range and is what you would expect would work

32
Q

Valid data

A

Input is correct and allowed in the programe

33
Q

Invalid data

A

Input is incorrect and not allowed by the computer

34
Q

Boundary data

A

data at the ends of the expected range

35
Q

Erroneous data

A

just outside the range

36
Q

Extreme data

A

Goes way beyond boundary

37
Q

Logic error

A

The program compiles but does not give the expected output and does not do what it should.

38
Q

Syntax error

A

The code does not follow the rules of the language. The program will not compile or run.

39
Q

Run time error

A

When the program doesn’t stop. E.g 0/ a number

40
Q

BODMAS

A

an acronym that describes the order priority given to mathematical operations.

41
Q

Operator Precedence

A

The default order in which operations in an expression are carried out.

42
Q

Why is Installation needed

A

To use camera
Copied onto device so it can be accessed by the OS quicker
To configure initial settings
So the user can access it through an icon (on a phone)

43
Q

Parameter

A

An item of data that is passed to a subroutine and used as a variable within the subroutine.