Practical Prgramming Tequniques Flashcards

1
Q

What is a program?

A

A program is a set of instructions written in a programming language to perform a specific task.

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

What is pseudocode?

A

Pseudocode is a simplified, human-readable way of writing algorithms without using specific programming syntax.

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

What is a flowchart?

A

A flowchart is a diagram that represents an algorithm using standard shapes to show the flow of control.

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

Why is planning a program important?

A

Planning helps identify the structure, logic, and purpose of the program before coding, reducing errors and improving efficiency.

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

What does testing a program mean?

A

Testing means running a program with various inputs to check that it behaves correctly and meets the requirements.

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

What is debugging?

A

Debugging is the process of finding and fixing errors or bugs in a program.

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

What is a syntax error?

A

A syntax error occurs when the code breaks the rules of the programming language, such as missing colons or brackets.

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

What is a logic error?

A

A logic error is when the program runs without crashing but produces incorrect results due to a flaw in the algorithm or logic.

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

What is a runtime error?

A

A runtime error is an error that occurs while the program is running, such as dividing by zero or accessing an index that doesn’t exist.

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

How can you prevent errors in your program?

A

Use proper testing, validation, debugging tools, and follow good programming practices like using clear variable names and adding comments.

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

What is a test plan?

A

A test plan is a document that outlines what inputs will be tested, what the expected outputs are, and how the results will be verified.

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

What are the types of test data?

A

The main types are: normal data (expected), boundary data (at the limits), erroneous data (invalid), and extreme data (beyond expected limits).

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

What does refining a program mean?

A

Refining involves improving code readability, efficiency, and maintainability, often by restructuring or simplifying parts of the program.

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

Why are comments useful in code?

A

Comments help explain what code does, making it easier for others (or yourself later) to understand and maintain.

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

What is meant by maintainability in programming?

A

Maintainability refers to how easily code can be modified, debugged, or updated in the future.

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