PSPD Flashcards

1
Q

What are the steps in problem solving?

A
  1. Define the problem
  2. Analyze the problem
  3. Select the most efficient solution
  4. Develop an algorithm to solve the problem
  5. Test and validate the solution
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is an algorithm?

A

A design of a set of instructions that must be followed when solving a problem

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

What is a program?

A

A method or set of instructions when solving a problem and written in a programming language.

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

What are some characteristics of an algorithm?

A

Clear and unambiguos- algorthyms must me clear and distint and lead to a single conclusion
Well defined output- must me clear on what output will be produced and be well defined
sequential- must be step by step
language independent- must be simple and in a readable manner.
Finiteness- must be finite and not result in infinite loops or anything similar.

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

What are the 3 control structures of an algorithm?

A

Sequencing
Selection
Iteration/looping

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

What is sequencing?

A

Accepting one statement in a perfect order on after the other from start to stop

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

What is selection?

A

The decision making process and evaluate the condition if its true and the alternatives otherwise.

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

What is iteration/looping?

A

A block of statements being done over and over until a particular value is reached or over a set amount of time.

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

What are the words associated with looping?

A

For, while, repeat

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

What is a pseudocode?

A

The use of natural language contructs modeled to look like statements in many programming language.

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

what are the types of statements?

A

Input
Output
Processing

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

What is the input statement?

A

requires an action by the user to type in instructions.

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

What is the output?

A

Prints information on the screen

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

What is the processing statement?

A

carries out calculation or assignments that require turning data to information.

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

What is a characteristic of a pseudocode?

A

Pseudocodes can be modular- large tasks can be subdivided into smaller tasks and can be put together to form the complete program.

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

What are some advantages of a psudocode?

A

indepent of a particular language- programmers from a different language can understand
programmers dont have to worry about synatx
lay people can validate the logic because its easy to understand.

17
Q

What are disadvantages of pseudocodes?

A

Its very detailed so it requires alot of concentration.
Due to its loose standards solutions can be depicted in mny ways by different people.

18
Q

What is a flowchart?

A

A way of visually representing actions in a system and the sequence in which they are performed.

19
Q

What is an advantage of flowcharts?

A

A better way of communicating the logic especially to lay people because of their visual nature.

20
Q

What is a disadvantage of a flowchart?

A

It can get very big when the program is long and complex.

21
Q

What are the storage types?

A

Variables, constants and literals

22
Q

what is a variable?

A

names associated with values in memory that can change during the program

23
Q

what is a constant

A

a constant stores a value that once its set it cannot be changed

24
Q

What is a literal?

A

a notation representing a fixed value .

25
Q

What are the data types?

A

Integers
reals
boolean
characters
strings

26
Q

What are defining diagrams?

A

used to break down the problem and figure out the 3 parts of the solution. done in the first step of problem soolving.