Unit 1 Problem Solving
Unit 1 Problem Solving
Q.1. What is Problem Solving? Ans: Something unexpected or unplanned is called candid.
Ans: Finding solution of a problem in a systematic way is For example, if you are asked to find the number of
called problem solving۔ students of cricket player in your school you can estimate
Q.2. What is Defining a Problem? by counting cricket players in your class and then multiply
Ans: A well-defined problem is the one that does not have it by the total number of classes in your school. This
any ambiguities. It has clear goal and easy to understand. answer is candid solution. Candid solution helps to save
Q.3. What are the strategies to define a problem? time but it may not be actual solution.
Ans: Different strategies can be used to define a problem Q.12. Explain Selecting the Best Solution?
like I. Gain Background knowledge: we have to Ans: A best solution among all possible solutions is that
identify a state / situation in which a problem is one which has less number of steps or the solution which
happening. II. Use Guesses: On the basis of past is achieved in less
experience by using of right guesses unknown information amount of time. For
collected. III. Draw a Picture: By drawing the picture Example you have to
fill the undefined information. find a name of student
Q.4. Define Problem Analysis with Example. on a website. It can be
Ans: Problem analysis helps to understand a given done by.
problem. Problem analysis I. Look at each name
is the process to find out on website one by
the 5 Ws from the problem one until the name is found or list is over.
statement II. Search the name after printing the list.
For example teacher asks III. Put all data in Excel Sheet and sort it in alphabetic
student to prepare the list order and find the name.
of students in the school IV. Just Press Ctrl+F in browser type name and press
whose name start with letter „A‟ for preparing an enter system will find it.
alphabetic directory of all students in one week. Q.13. What is Flowchart?
Q.5. What are 5 Ws in Problem Analysis? Ans: It is a pictorial / graphical
Ans: Understanding of a problem usually includes representation of the steps to
identification of the 5 Ws (What, Who, When, Where, and solve a problem. Various
Why). In above problem identification of 5 Ws are as interconnected symbols are used
follow What: List of students‟ names starting with letter for it.
„A‟ Who: Students Why: To prepare the directory of Q.14. What is Importance of
students. When: within a week Where: school Flowchart?
Q.6. What is meant by Planning a Solution? Ans: Importance of Flowchart is
Ans: It includes to find out the right strategy to solve the as follow
problem these strategies are Divide and Conquer, Guess, I. It is used to plan a solution.
Check & Improve, Act it Out, Prototype (Draw). II. It helps to understand a way of problem solution
Selection of a particular strategy is depends upon the quickly.
nature of problem. III. It helps to verify the correctness of solution
Q.7. What is Divide and Conquer Strategy? quickly.
Ans: Dividing a complex problem into smaller problem is IV. It is a good way to communicate the problem
called Divide and Conquer Strategy. solution to other people.
Q.8. What is Guess, Check & Improve Strategies? Q.15. Determine the Requirements for Flowchart.
Ans: In this Strategy a designer guesses a solution of Ans: Following requirements are necessary for flowchart.
problem and then checks its correctness. If it is not I. Inputs: it means taking data from the user. Number
according to expectation then he/she refines it. of inputs and types of inputs must be known.
Q.9. What is Act it Out Strategy?
Ans: In this Strategy the designer prepare a “to-do” list of
tasks.
Q.10. What is Prototype (Draw) Strategy?
Ans: In this Strategy pictorial representation of the
solution is prepared.
Q.11. What is Candid Solution?
Ans: It is vital to point out the defects or errors. It helps in logical means algorithm is providing wrong result. For
improving a solution. Correctness of solution depends identification of error trace table is used.
upon the testing. Q.33. What is Trace Table?
Q.25. Explain Types of Test Data? Ans: The multi-column, multi-row table used to test
Ans: Different solutions require different types of data. algorithm for identification of logical errors. Each column
Proper test data is required to improve the quality of shows name of data and each row showing values of data
solution. These types are Valid Test Data, Invalid Test at each step. For example;
Data, Boundary Test Data Values, Wrong Data Formats, Algorithm
and Absent Data. Step1 number = 3
Q.26. What is Valid Test Data? Step 2 PRINT number
Ans: The data that fulfills the input requirements of Step 3 FOR i from 1 to 3:
algorithm. If an algorithm is supposed to take a numeric Step 4 number = number + 5
value between 1 and 100 as input, then any value between Step 5 PRINT number
1 and 100 is a valid test data. Step 6 PRINT “ ? ”
Trace Table
Line number i output
Q.27. What is Invalid Test Data? 1 3
Ans: Improper or unexpected data that give wrong output 2 3
or show messages to notifying the user for incorrect. If an 3 1
4 8
algorithm requires your age in number of days but you
5 8
give date of birth as input then the algorithm may not
3 2
work properly. 4 13
Q.28. What are Boundary Test Data Values? 5 13
Ans: A solution is tested on extreme values, For example, 3 3
to calculate interest we can consider principal amount as 0 4 18
or a very huge amount. 5 18
Q.29. What is Wrong Data Formats? 6 ?
Ans: It is wise to check how the system reacts on entering
data in an inappropriate format. For example; giving an Q.34. What is meant by Testing Using Invalid Data?
alphabet as input when a numeric value is expected. Ans: To handle unexpected data inputs algorithm is tested
Q.30. What is Absent Data? by giving invalid data.
Ans: It is also important to study that the solution still EXERCISE
works if less number of inputs are given than expected. Choose the correct option.
For example, if someone enter ID card number in less
1) Which solutions are not reached through proper
than 14 digits how the system reacts in such situations. algorithms work planning?
Q.31. Differentiate between Verification & i Prepared solution ii Candid solution
Validation. iii Strategized solution iv Best solution
Ans: Verification means to test if the solution is actually 2) _________is a graphical representation of an
solving the same problem for which it was designed. For algorithm
example, if you are asked to give a solution for calculating
compound interest then verification means to know that it i Matrix ii Graph
iii Flowchart iv Solution
is giving results for compound interest not for the plain
3) Which symbol in the flowchart is used to either
interest. start or end the flowchart?
Validation means to test whether the solution is correct or i Terminal ii Connector
not. For example, if you are asked to give a solution for iii Process iv decision
calculating compound interest then validation means to 4) _______means to test if the required solution is
know whether it is finding the correct compound interest there.
or not. If a solution is verified, then it is validated with the i Verification ii Algorithm
help of test data. iii Validation iv Flowchart
5) In _______ error, the solution is working but not
Q.32. What is Identification & Correction of Errors?
giving required results
Ans: It is important to identify the root cause of failure of
i Random error ii Logical error
algorithm during verification. Sometime the error is iii Syntax error iv Runtime error
Overloading of
passengers 30 % in 1000-
A25 Up to 1 Month
excess of permissible 5000
limits