Categories
Computer 10th Class Computer

Chapter 1 Problem Solving – 10 Class Computer Science Notes

10 Class Computer Science Notes

Chapter No 1

Problem Solving

Answer the following questions.

  1. What do you mean by problem solving? Briefly describe the problem process?

Answer. Problem Solving

Problem solving is a skill to solve any problem in computer science. Problem is done by programming. If anybody is a good programmer then it means he is a problem solver. To solve a problem correctly and efficiently require a computer program that has been developed after detailed planning.

To solve any kind of problem following steps are followed:

  1. Problem identification
  2. Analysis the problem
  3. Specify Requirements
  4. Design algorithm and draw flowchart
  5. Write the program (coding)
  6. Test and Debug the program
  7. Implement the program
  8. Maintain and update the program
  9. Document the program

Problem identification

first of all the problem should be observed carefully. The major areas concerned are identified and a relevant information is filtered out, e.g If we want to develop simple calculator then our major concern is how basic arithmetic operations are performed and what should be our input and what output should be displayed?

 

Specify requirements

Most of the users cannot explain their exact software requirements. This stage solves the formation of a requirement document which describes the features to provide restrictions under which it must operate and an abstract description of the software which provides a basis for design and implementation.

Analyse the problem

In this step problem is decompose into sub problems. Now we try to solve these problems separately, it will give us a simple solution. This method is known as Top Down design. It is also called Divide and conquer rule.

In this step we will analyse that how much solution are possible? Which one is the best solution? Is problem solvable on computer? What are inputs and outputs? How the problems divided into Sub problems?

Design Algorithm And Draw Flow Chart

Once a programmer understand the problem, next stage is the planning stage. The planning stage consists of developing and algorithm and converting it into a flow chart or pseudo code or both.

Algorithm is a systematic procedure developed to solve a problem before writing and actual program. More precisely and algorithm is a complete procedure of land that describe the logic of a program.

In any situation programmer would usually have a choice of algorithms. Each method will have its own merits and demerits. One of the important job of a computer programmer is to select the best one with reason of selecting that.

Write the program (Coding)

In this time we convert our algorithm into a computer program in a particular language according to the syntax.

A process of converting algorithm into a computer program in some computer is called coding.

Test and debug the program

in this time we will run the program several times and if it gives correct results it means our program is accurate. If in the process of testing we will find any type of error then error must be debug.

Implement the program

After the successful testing of the program we will execute it for our Requirements. Taking the program and placing it into operation is called implementing of the program.

 

Maintain and update the program

When our program is ready for implementation. We have must maintain it and update. Updating or Upgrading of program is required for hardware and software requirements

Sometimes improvement is needed in our program, so we have to upgrade program time to time.

Documentation

Documentation is description of software for its right use. A documentation is ready software program necessities, set of rules, application, designed, checking out, change and manual.

 

Question: What is debugging? How many types of errors can occur in a program. Describe briefly?

Answer. Debugging is the process of finding and removing errors in the program.

There can be three types of programming errors:

  1. Syntax error
  2. Execution error
  3. Logical error

Syntax error

A Syntax error occurs, when the program violates one or more grammatical rule in programming language. These errors are detected at compile time. For example to execute a wrong statement all command such as typing print instead of print statement.

Runtime error

Runtime error occurs when the program directs the computer to perform an operation such as dividing a number by Zero. Runtime errors are detected and display the computer during the execution of a program when a runtime error occurs, the computer will stop execution the program.

Logical error

Logical errors occur when program follows are wrong logical. These are the most different errors to locate logical errors can be identified by just looking at wrong output of the program.

 

Question: Write steps for algorithm for making a telephone call to your friend?

Answer.  

  1. To begin pick up the receiver and dial the number of friend.
  2. If there is no tone of call ringing then place down the receiver. If the bell is ringing on other side but if it is busy tone then drop down receiver and wait for a while.
  3. Again pick up the receiver and dial the number, if ringing tone is heard then wait for someone receive your call.
  4. if receiver is your friend then talk with him but if receiver is any family member of your friend and convey him message.

 

Question: What are the advantages of flowchart discuss limitations of flowchart.

Answer. Advantages of Flowchart

  • The flowchart help us in planning world in an organised manner.
  • It demonstrates genuinely the logical glide of the pc software.
  • A flowchart can help the persons, the one who is running the program and someone else who is reviewing the program.

Limitation a flowchart

  • It is difficult to draw flowchart for complex problems.
  • Is alterations required then flowcharts is to be redrawn.

Answer the following short questions. Problem Solving in Computer Science

 

Question: List steps that should be followed to solve a problem?

Ans. Following steps are involved in solving problem:

  • Problem identification
  • Analyse the problem
  • Specify Requirements
  • Design algorithm and draw flowchart
  • Write the program (coding)
  • Test and Debug the program
  • Implement the program
  • Document the program

 

Question: What is analysis? Describe its importance in solving problems.

Ans. Analysis

Analysis  is also known as top down design this method is also called divide and conquer rule.

  • In this step problem is decomposed into some problems.
  • In this type we will analysis that
  • Understanding the problems.
  • Can it be solved through questionnaire.
  • What programming language to use.
  • Number of possible solutions.
  • Choosing the simplest one.

Question: What method should be adopted to solve complex problems? Discuss briefly.

Ans. complex problems are easy to solve if we decomposed it into some problems. We have to solve each sab problems separately. It give us a simple solution this technique is called top down design or divide and conquer.

Question: What do you mean by Syntax of programming language. Is it necessary to know the syntax for solving problems on computer?

Ans. The grammatical rules of programming language to write programs are referred as Syntax of that programming language.

It is necessary to know the syntax of programming language to solve the problem. If computer cannot understand instructions without Syntax and it give sentence error.

Question: Why document is considered vital in problem solving process?

Ans. Documentation is description of program for its proper use. A documentation is about software requirements, algorithm, program, designed, testing, modification and manual.

 

Question: Differentiate runtime error and logical error?

Ans.  Differentiation (Computer Problem Solving)

                     Runtime error

Runtime error occurs when the program directs the computer to perform an operation such as dividing a number by Zero.

Runtime errors are detected and display the computer during the execution of a program when a runtime error occurs, the computer will stop execution the program

                        Logical error

Logical errors occur when program follows are wrong logical.

These are the most different errors to locate logical errors can be identified by just looking at wrong output of the program.

 

 

Question. is it necessary for an algorithm to solve a problem infinite number of steps. Why? (Computer Problem Solving)

Ans. Yes, it is necessary for an algorithm to solve problems in a finite set. Because it will become more effective and clear. If there are large number of steps, then program become complicated and it will difficult to solve it.

 

Question: Compare flowchart and algorithm.

Ans. Flow Chart

Once a programmer understand the problem, next stage is the planning stage. The planning stage consists of developing and algorithm and converting it into a flow chart or pseudo code or both.

Algorithm

Algorithm is a systematic procedure developed to solve a problem before writing and actual program. More precisely and algorithm is a complete procedure of land that describe the logic of a program.

In any situation programmer would usually have a choice of algorithms. Each method will have its own merits and demerits. One of the important job of a computer programmer is to select the best one with reason of selecting that.

 

Leave a Reply

Your email address will not be published. Required fields are marked *