Problem Solving Flashcards

1
Q

What is a sequence?

A

Execution of statements or functions one after another.

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

What is selection?

A

Where the program is interrupted and moved onto a different point based on a decision. This is normally a Boolean expression.

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

What is iteration?

A

Controlled by Boolean expression, a section of the code that is repeated.

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

What are examples of iteration?

A

For
While
Repeat

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

What is repeat?

A

The section of code is repeated until the condition is fulfilled. A repeat is always executed at least once.

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

What is a while loop?

A

Condition for maintaining or terminating is checked before entry on to the loop. A while loop may or may not be executed at all.

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

What is a for loop?

A

Loop executes a fixed number of times, controlled by a variable.

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

What is Recursion?

A

Is where a procedure or function calls itself.

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

What is a global variable?

A

Is declared or initialized outside any subprograms; that is functions or procedures. It then becomes accessible to code written anywhere in the program. This can be useful if the programmer needs to be able to update a value from various subprograms, perhaps a running total of the results.

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

What is a local variable?

A

Is declared inside a subprogram. This results in it only being accessible within that subprogram.

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

Why is it good to use local variable?

A

Because they are less likely to accidentally be altered by other modules.

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

What is a function?

A

A function is an algorithm that take an input and produces an output for each input. Some function have multiple inputs and outputs.

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

What are procedures?

A

Are subprograms that help and support modular programming. The only real difference between a procedure and a function is that a function should return a value. Procedures are generally a set of commands that act independently of the rest of the program and do not usually return a value.

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

What is an IDE.

A

Integrated Development Environment: Specially designed software package that includes an editor for writing source code, facilities for automating the build, a debugger and features to help with code writing.

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