Professional Documents
Culture Documents
CH 5
CH 5
Question 1.
Define problem-solving.
Answer:
It is the process of expressing the solution of a specific problem, in terms of simple operations that can be
understood by the computer.
Question 2.
What is the problem definition?
Answer:
The process of understanding the given problem and what the solution must do is known as problem definition.
Question 3.
What are the steps involved in problem analysis?
Answer:
The steps involved in problem analysis are:
Question 4.
What is the important aspect of the design of a solution?
Answer:
The most important aspect of developing a solution is developing the logic to solve the specific problem.
Question 5.
Write the tools used in the design of a solution.
Answer:
The algorithm and flowchart tools are used in the design of a solution.
Question 6.
Define an algorithm.
Answer:
An algorithm is a “step by step procedure to solve a given problem infinite number of steps”.
Question 7.
Define the flowchart.
Answer:
A flowchart is a pictorial or graphical representation of a solution to any problem.
Question 8.
How are flowcharts classified?
Answer:
Flowcharts are classified as system flowchart and program flowchart.
Question 9.
What is a pseudo code?
Answer:
Pseudo code is structured English that consists of short, English phrases used to explain specific tasks within a
program’s algorithm.
Question 10.
Define coding.
Answer:
The process of translating the algorithmic solution or flowchart solution into a set of instructions in a
programming language is called as coding.
Question 11.
What is testing?
Answer:
It is the process of checking the program logic, by providing selected sample data and observing the output for
correctness.
Question 12.
What do you mean by debugging?
Answer:
The process of detecting the errors and correcting the errors in a program is called as debugging.
Question 13.
What is the function of compiler?
Answer:
It is a translator software which converts source program into its equivalent machine language object program.
Question 14.
Define source program.
Answer:
The program written using high level language is called source program.
Question 15.
Define object program.
Answer:
A machine language program generated by the compiler is called object program.
Question 16.
What is syntax error?
Answer:
It refers to an error in the syntax of a sequence of characters or tokens that is intended to be written in a
particular programming language.
Question 17.
What are semantic errors?
Answer:
An error, which occurs due to the incorrect logic and a solution is called a semantic error.
Question 18.
What are run time errors?
Answer:
The errors that may occur during execution of the program are called run time errors.
Question 19.
Name the two types of program documentation.
Answer:
The two types of documentation are internal documentation and external documentation.
Question 20.
Define program maintenance.
Answer:
Program maintenance is the process of periodic review of the programs and modifications based on user
requirements.
Question 21.
What is sequential construct?
Answer:
The ability of executing the program statement one after another in sequence is called sequential construct.
Question 22.
Define selection.
Answer:
It is the process of selecting a certain set of statements based on a requirement for execution.
Question 23.
Define iteration.
Answer:
It is the process of repeating the execution of a certain set of statements again and again until a requirement is
satisfied.
Question 24.
What is the simple if also called as?
Answer:
The simple if is also called a one-way branch.
Question 25.
What is the if-else construct is also called as?
Answer:
The if-else construct is also called a two-way branch.
Question 26.
What is the if-else-if construct is also called as?
Answer:
The if-else-if construct is also called a multiple-way branch.
Question 27.
When is the multiple selection construct used?
Answer:
If there are more than two alternatives to be selected for execution then multiple selection construct is used.
Question 28.
What are the two types of iterative constructs?
Answer:
The two iterative constructs are conditional looping and unconditional looping.
Question 29.
What is top-down design?
Answer:
It is the process of dividing a problem into subproblems and further dividing the subproblems into smaller
subproblems and finally to problems that can be implemented as program statements.
Question 30.
What is bottom-up design?
Answer:
It is the process of beginning design at the lowest level modules or subsystems and progressing upwards to the
design of the main module.
Question 31.
What is structured programming?
Answer:
It is an easy and efficient method of representing a solution to a given problem using sequence, selection and
iteration control.
Question 32.
What is a modular design technique?
Answer:
In this technique, a given problem is divided into a number of self-contained independent program segments.
Each program segment is called a ‘module’ and a module can be called for in another program or in another
module.
1st PUC Computer Science Problem Solving Methodology Two/Three Marks Questions and
Answers
Question 1.
What does the programming task involves?
Answer:
The programming task involves defining and analyzing the problem and developing the solution logically, using
an algorithm.
Question 2.
Which activity is represented by a rectangle and a rhombus symbol in the flowchart?
Answer:
Question 3.
What is the use of the assignment statement? Give an example.
Answer:
The assignment statement is used to store a value in a variable. For example, let A = 25
Question 4.
What are the input and output statements?
Answer:
The input statement is used to input value into the variable from the input device and the output statement is
used to display the value of the variable on the output device.
Question 5.
Give the general form of a simple if statement.
Answer:
If (test condition) then
Statement 1
Question 6.
Give the general form of if-else statement.
Answer:
If (test condition) then
Statement;
Else
Statement;
Question 7.
What is unconditional looping? Give an example.
Answer:
If a set of statements are repeatedly executed for a specified number of times, is called unconditional looping.
For example, for a conditional statements.
Question 8.
What is the difference between a program flowchart and system flowchart?
Answer:
A program flowchart details the flow through a single program. Each box in the flowchart will represent a
single instruction or a process within the program.
A system flowchart will show the flow through a system. Each box will represent a program or a process made
up of multiple programs.
Question 9.
Give the general form of for conditional structure.
Answer:
The general form of for conditional structure is
For (initialization; condition; increment/decrement)
statement 1
statement2
statement
Question 10.
Give the characteristics of a good program.
Answer:
Modification and portability are the two important characteristics of a good program.
Question 11.
Give the list of statements that can be used in structured programming.
Answer:
a. go to statement
b. break or continue statement
c. multiple exit points.
Question 13.
Mention the advantages of modular programming.
Answer:
Code reusability, localized errors, and team, work are the few advantages of modular programming.
1st PUC Computer Science Problem Solving Methodology Five Mark Questions and Answers
Question 1.
Explain the stages of problem-solving methodology.
Answer:
The stages of problem-solving methodology are
1. Problem definition:
The problem should be clearly understood by the solution provider. One has to analyze what must be done
rather than how to do it and then is requires to developing the exact specification of the problem.
2. Problem Analysis:
In problem analysis, we try to understand what are the inputs to be specified and what are the required outputs.
4. Coding:
The process of writing program instructions for i.e., it is the process of transforming algorithm/flowchart into a
program code using programming language instructions.
5. Debugging:
It is the process of detecting and correcting the errors in the program. This stage is also referred to as
verification.
6. Program Documentation:
It is a reference material that contains details about a program and functions of different programs of software.
Documentation helps other users to understand the program and use it conveniently more effectively.
Question 2.
Explain the characteristics of the algorithm.
Answer:
Characteristics of the algorithm
a. It must be simple.
b. Every step should perform a single task.
c. There should not be any confusion at any stage.
d. It must involve a finite number of instructions.
e. It should produce at least one output.
f. It must give a unique solution to the problem.
g. The algorithm must terminate and must not enter into infinity.
Disadvantages:
Question 4.
Write the steps involved in developing a flowchart.
Answer:
Steps involved in developing a flowcharts
Question 5.
What are the advantages and disadvantages of a flowchart?
Answer:
Advantages:
Disadvantages:
Question 6.
Write a note on program errors.
Answer:
The different program errors are as follows;
1. Syntax error:
An error occurs when there is a violation of the grammatical rules of a programming language’s instructions. It
happens at the time of compilation. Such errors need to be rectified before proceeding further.
2. Semantic errors:
An error, which occurs due to the incorrect logic in a solution is called semantic error. It also occurs due to the
wrong use of grammar in the program.
3. Runtime Errors:
occur at run-time. Such an error causes a program to end abruptly or even cause system shut-down. Such errors
are hard to detect and are known as ‘Bugs’.
4. Logical Error:
It may happen that a program contains no syntax or run-time errors but still, it doesn’t produce the correct
output. It is because the developer has not understood the problem statement properly. These errors are hard to
detect as well. It may need the algorithm to be modified in the design phase and changing sources code.
Question 7.
Write a short note on flowchart symbols.
Answer:
Symbols used in flowcharts
Question 8.
Explain the top-down approach in brief.
Answer:
Top-Down Approach:
It is based on a concept called divide and conquer. A given problem is solved by breaking it down into smaller
manageable parts called modules. Hence it is also called as stepwise refinement. The subprograms are further
divided into still smaller subproblems. Finally, the subproblems are solved individually, and all these give the
solution to the overall problem.
Question 9.
Write a short note on structured programming.
Answer:
Structured Programming:
The concept was contributed by Professor Dijkstra and other colleagues made it popular. Structured
Programming deals only with logic and code and suggests making use of programming structures such as
sequence, selection, iteration and modularity in programs.
Features:
Advantages:
1. Programs are easy to write because the programming logic is well organized.
2. Programs can be functionally divided into smaller logical working units (modularity).
3. Modularity leads to understanding the program, test and debug easily.
4. Easy to maintain because of single entry and single exit features.
5. Eliminates the use of undisciplined controls (GOTO, BREAK, etc.,) in the program.