You can Download Chapter 5 Problem Solving Methodology Questions and Answers, Notes, 1st PUC Computer Science Question Bank with Answers Karnataka State Board Solutions help you to revise complete Syllabus and score more marks in your examinations.
Karnataka 1st PUC Computer Science Question Bank Chapter 5 Problem Solving Methodology
1st PUC Computer Science Problem Solving Methodology One Mark Questions and Answers
It is the process of expressing the solution of a specific problem, in terms of simple operations that can be understood by the computer.
What is the problem definition?
The process of understanding the given problem and what the solution must do is known as problem definition.
What are the steps involved in problem analysis?
The steps involved in problem analysis are:
- Data we need to provide (input) and
- Information we want the program to produce (the output).
What is the important aspect of the design of a solution?
The most important aspect of developing a solution is developing the logic to solve the specific problem.
Write the tools used in the design of a solution.
The algorithm and flowchart tools are used in the design of a solution.
Define an algorithm.
An algorithm is a “step by step procedure to solve a given problem infinite number of steps”.
Define the flowchart.
A flowchart is a pictorial or graphical representation of a solution to any problem.
How are flowcharts classified?
Flowcharts are classified as system flowchart and program flowchart.
What is a pseudo code?
Pseudo code is structured English that consists of short, English phrases used to explain specific tasks within a program’s algorithm.
The process of translating the algorithmic solution or flowchart solution into a set of instructions in a programming language is called as coding.
What is testing?
It is the process of checking the program logic, by providing selected sample data and observing the output for correctness.
What do you mean by debugging?
The process of detecting the errors and correcting the errors in a program is called as debugging.
What is the function of compiler?
It is a translator software which converts source program into its equivalent machine language object program.
Define source program.
The program written using high level language is called source program.
Define object program.
A machine language program generated by the compiler is called object program.
What is syntax error?
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.
What are semantic errors?
An error, which occurs due to the incorrect logic and a solution is called a semantic error.
What are run time errors?
The errors that may occur during execution of the program are called run time errors.
Name the two types of program documentation.
The two types of documentation are internal documentation and external documentation.
Define program maintenance.
Program maintenance is the process of periodic review of the programs and modifications based on user requirements.
What is sequential construct?
The ability of executing the program statement one after another in sequence is called sequential construct.
It is the process of selecting a certain set of statements based on a requirement for execution.
It is the process of repeating the execution of a certain set of statements again and again until a requirement is satisfied.
What is the simple if also called as?
The simple if is also called a one-way branch.
What is the if-else construct is also called as?
The if-else construct is also called a two-way branch.
What is the if-else-if construct is also called as?
The if-else-if construct is also called a multiple-way branch.
When is the multiple selection construct used?
If there are more than two alternatives to be selected for execution then multiple selection construct is used.
What are the two types of iterative constructs?
The two iterative constructs are conditional looping and unconditional looping.
What is top-down design?
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.
What is bottom-up design?
It is the process of beginning design at the lowest level modules or subsystems and progressing upwards to the design of the main module.
What is structured programming?
It is an easy and efficient method of representing a solution to a given problem using sequence, selection and iteration control.
What is a modular design technique?
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
What does the programming task involves?
The programming task involves defining and analyzing the problem and developing the solution logically, using an algorithm.
Which activity is represented by a rectangle and a rhombus symbol in the flowchart?
- The rectangle symbol represents the process or calculation activity.
- Rhombus symbol represents decision making or branching activity.
What is the use of the assignment statement? Give an example.
The assignment statement is used to store a value in a variable. For example, let A = 25
What are the input and output statements?
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.
Give the general form of a simple if statement.
If (test condition) then
Give the general form of if-else statement.
If (test condition) then
What is unconditional looping? Give an example.
If a set of statements are repeatedly executed for a specified number of times, is called unconditional looping. For example, for a conditional statements.
What is the difference between a program flowchart and system flowchart?
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.
Give the general form of for conditional structure.
The general form of for conditional structure is
For (initialization; condition; increment/decrement)
Give the characteristics of a good program.
Modification and portability are the two important characteristics of a good program.
Give the list of statements that can be used in structured programming.
- Sequence of sequentially executed statements.
- Conditional execution of statements.
- Iteration execution statements.
Give the list of statements that cannot be used in structured programming.
- go to statement
- break or continue statement
- multiple exit points.
Mention the advantages of modular programming.
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
Explain the stages of problem-solving methodology.
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.
3. Design of a solution using design tools:
The design of a solution includes a sequence of well-defined steps that will produce the desired result (output). Algorithms and flowcharts are used as design tools and represent the solution to a problem.
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.
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.
Explain the characteristics of the algorithm.
Characteristics of the algorithm
- It must be simple.
- Every step should perform a single task.
- There should not be any confusion at any stage.
- It must involve a finite number of instructions.
- It should produce at least one output.
- It must give a unique solution to the problem.
- The algorithm must terminate and must not enter into infinity.
Question 3. What are the advantages and disadvantages of an algorithm?
- Easy to understand since it is written in universally a spoken language like English.
- It consists of a finite number of steps to produce the result.
- Easy to first develop the algorithm.
- It is independent of any programming language, (universal).
- Easy program maintenance.
- It is time-consuming and difficult to understand for larger and complex problems.
- Understanding complex logic through algorithms would be difficult.
Write the steps involved in developing a flowchart.
Steps involved in developing a flowcharts
- Understand the problem statement clearly before developing the flowchart.
- Study the outputs to be generated and the required inputs to solve the problem.
- Design the process in such a way that it produces the desired result.
- Test the flowchart by giving test data.
- Verify the result for correctness. Make suitable changes, if required, and repeat the process.
What are the advantages and disadvantages of a flowchart?
- It is a means of communication and easy to understand.
- Easy to convert into a program code.
- Independent of programming language, i.e., A flowchart can be used to write programs using different programming languages.
- Easy to test the program for errors and easy removal of such errors.
- It is time consuming process as it makes use of a number of symbols.
- It is difficult to show the complex logic using a flowchart.
- Any changes in the flowchart needs redrawing the flowchart again.
Write a note on program errors.
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.
Write a short note on flowchart symbols.
Symbols used in flowcharts
Explain the top-down approach in brief.
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.
Properties of Top-Down Analysis:
- Understandability: The individual modules are organized to execute in a particular sequence.
- This helps to understand the program behaviour more easily.
- Clear Identification of tasks.
- Easy program maintenance.
- Removes duplication or repetition of coding in a problem.
- Enhances the feature of code reusability.
Write a short note on 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.
- It focuses on techniques for developing good computer programs and problem-solving.
- The structures can be repeated one within another.
- It is most important to consider single-entry and single-exit control in a program and structure.
- Structured code is like a page, which can be read from the top to bottom without any backward references.
- Reading from top to bottom makes the code easy to read, test, debug, and maintain.
- Programs are easy to write because the programming logic is well organized.
- Programs can be functionally divided into smaller logical working units (modularity).
- Modularity leads to understanding the program, test and debug easily.
- Easy to maintain because of single entry and single exit features.
- Eliminates the use of undisciplined controls (GOTO, BREAK, etc.,) in the program.