Paper 23 Flashcards

1
Q

Define decomposition

A

Breaking a problem down into subproblems

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

Define abstraction

A

Removing unnecessary detail from a problem

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

define casting

A

casting is changing the datatype

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

define iteration

A

code is repeated(“looped”) until specefied conditions are met

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

A procedure

A

doesn’t return a value

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

A function

A

returns a value

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

What are the properties of a well-structured program

A

meaningful variable names-easy to keep track of what is happening
indentation-clarity as the blocks are separated
comments can be used to explain what you are intending to do

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

Pros of structured programming

A

The code is more readable and easier to understand

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

what is a logical error?

A

Logical erros occur when teh programs execution appears to run as normal but not as the programmer intended

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

What is a syntax error?

A

the syntax of a language is the collection of rules that form its struture.A syantax error occurs when the programer breaks these rules

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

define trace tables?

A

Used to test for logical errors

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

what is validation?

A

Checking data meets a set f criteria before you process it

e.g. length check

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

What is an IDE?

A

Integrated development environment-an application that provides a selection of tools for programmers allowing them to code using additional tools in one place

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

Psuedo code for linear search

A
current = 0
found = false
last = length(list)-1
REPEAT UNTIL found = true OR current > last
      IF list [current] = target
             found = true
             Return current
      ELSE 
              current = current + 1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Big o for linear and binary search

A

worst case :

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

Best case for insertion sort and linear search

A

O(n)

17
Q

What is best case

A

this is for a sorted list

18
Q

How to add to an arrray

A

item will be added to the end

Pionters updated