0% found this document useful (0 votes)
63 views2 pages

Ch-2 Notes Class 11

cbse class 11 notes for class work

Uploaded by

Chamu Ndeeswari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views2 pages

Ch-2 Notes Class 11

cbse class 11 notes for class work

Uploaded by

Chamu Ndeeswari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Ch-2 continution

14. What do you mean by clarity and simplicity of expression?


Expressions are used to implement a particular task. It is a combination
of Operators, Operands and Constants. Any expression used in the
program should be understood by the user. The followings are some of the
points to be kept in mind while using expressions in a program.
(i) Use library functions to make programs more powerful
(ii) Follow simplicity to maintain the clarity of expression
(iii) Avoid program tricks usage, whose meaning is difficult to understand
by the
user.

15. What do you mean by flexibility?


A program should be flexible enough to handle most of the changes
without having to rewrite the entire program. A flexible program is used to
serve many purposes. For example, CAD (Computer Aided Design)
software is used for different purposes such as; engineering drafting,
printing circuit board layout and design, architectural design, technical
drawing, industrial art, etc. Most of the programs are being developed for
certain period and they need updation during the course of time.

16. Explain all steps of problem solving process.


Programming means a problem solving activity, which consists of four
steps. They are;
(i) Understanding the problem;
(ii) Devising a plan;
(iii) Executing the plan; and
(iv) Evaluation
Understanding the problem
The first step is to understand the problem well. It may be very
difficult to understand the problem but it is crucial. In general, one must
find out the output from the given data (input data) and assess the
relationship between input and output data. It is also important to verify
whether the given information is sufficient to solve the problem or not.
Devising a plan
It means drawing an action plan to solve the problem, once
understood. A plan is
devised from data processing to the result according to the relationship
that links both of them. If the problem is trivial, this step will not require
much thinking.
Executing the plan
Once the plan is defined, it should follow the plan of action
completely and each
element of the plan should be checked as it is applied. In the course of
execution, if any part of the plan is found to be unsatisfactory, the plan
should be revised.
Evaluation
Finally, the result should be examined in order to make sure that it is
valid and that the problem has been solved completely.

17. What is indentation? Explain with an example.

1
Leading white space (spaces and taps) at the beginning of each
statement, which is used to determine the group of statement, is known
as „indentation‟.
Example
If A > B :
print „A is Big‟ # Block1
else:
print „B is Big‟ # Block2

18. What do you mean by debugging?


Debugging is the process of finding and correcting the errors in the
program code.
Type of errors: There are three types of errors generally occur during
compilation and running a program. They are
(i) Syntax error;
(ii) Logical error; and
(iii) Runtime error.

19. What is the use of self documenting code in programming?


The source code, which uses suitable name for the identifiers
(variables and methods), is called self-documenting code. Also, giving
proper name for variables and methods would tell the reader of your code
clearly -what is it doing? Hence, a good program must have a self-
documenting code.

20. What is the purpose of giving meaningful name for identifiers?


 Identifiers are user defined names.
 They are used to name things.
 A name is associated with a function or data object (constants
and variables) and used to refer to that function or data
object.
 Identifiers are made up of letters (A-Z, a-z), digits (0-9), and
the underscore character ( _ ).
 They, however, must begin with a letter or underscore and not
with a digit.
(i) Give meaningful name for variable (data – object) and
function.
(ii) Use proper names for constants.
(iii) Do not use same name like custom, customer or account,
accountant.
(iv) Do not use one letter identifiers.

You might also like