NCERT Solution - Programming Methodology, Computer Science (Python), Class 11 Notes - Class 11

Class 11: NCERT Solution - Programming Methodology, Computer Science (Python), Class 11 Notes - Class 11

The document NCERT Solution - Programming Methodology, Computer Science (Python), Class 11 Notes - Class 11 is a part of Class 11 category.
All you need of Class 11 at this link: Class 11

TOPIC – 1

General Concepts Of Programming 

Very Short Answer Type Questions (1 mark each) 

Question 1: On which step programming methodology used ? 

Answer: Before writing program. 1 

Question 2: What do you mean by modular approach ? 

Answer: Breaking of a problem into sub-problems. 1 

Question 3: Which characteristics of programming methodology refers to the overall readability of the programme ? 

Answer: Clarity. 1 

Question 4: Are comments executed ? 

Answer: Comments are not executed 1 

Question 6: How many types of comments ? 

Answer: Comments are of two types : single line and multiple line. 1 

Question 7: Why do we use comments ? 

Answer: Comments helps the reader to understand the programme easily. 1 

Question 8: Which characteristics refer to insertion of extra blank spaces before declaration ? 

Answer: Indentation 1 


Short Answer Type Questions-I (2 marks each) 

Question 1: Define Clarity of source code.
Answer: 
The extent to which inherent language features support source code that is readable and understandable and that clearly reflects the underlying logical structure of the program. 

Question 2: Explain clarity of expression 

Answer: Clarity refers to the overall readability of the program, with emphasis on program logic. It allows other programmers to follow the program, if the program is written clearly. It also makes the programmer to grasp his or her own program logic even after a long period of time. 

Question 3: Give an example of clarity of expression. 

Answer: Suppose we wish to write a program to calculate the area of a circle. We require two variables; radius and 


Explain types of comments. 

Answer: There are two types of comments in a C+ + program; single line comment and multi-‘line comment. Single line comment begin with double slash (/ /) and end in the same line. We can write a program statement and a comment in same line. Whatever written after the / / is ignored by the compiler. 

Question 5: Write any two characteristic of comments. 

Answer: Comments are not executed in a program. Since the compiler ignores comments, there will be no increase in the file size and execution time. 

Question 6: Write any two purpose of comments. 

Answer: 1. Comments help the reader to understand the program easily. 

2. When a program consists of several functions, comments can be added to each function to indicate the purpose of the function. 

Question 7: Define identation. Answer: Indentation refers to the insertion of extra blank , spaces before declarations and statements. It enhances the readability of programs. 


Long Answer Type Questions (4 marks each) 

Question 1: Define clarity and simplicity of expression with eample. 

Answer: Crarity and Simplicity of Expression: In the early days most of the computer programs were written to 

Simple expressions are also easily readable and can be understood by others without making any extra efforts. 

For example, a Statement like : 

A = square root((x /d)+(c+z) – (u*v) )/L may be written in two steps as : 

A1 = x /d 

A2 = (c+z) 

A3 = u * v 

A = square root(Al + A2 – A3)/L 


Topic – 2 

Documentation And Programming Maintenance 

Very Short Answer Type Questions (1 mark each) 

Question 1: How many types of documentation are there ?

 Answer: (a) internal documentation (b) external documentation 

Question 2: Which documents helps in programme maintanance ? 

Answer: internal documentation 

Question 3: Write the alternate name of error.
Answer:
Bugs 


Short Answer Type Questions-I (2 marks each) 

Question 1: Explain documentation 

Answer: All programs need not to be short and simple. Complex programs can be better understood if additional information is provided. Documentation is a method of providing useful information about a program. It consists of written descri ptions, specification and development of the program. 

Question 2: Explain programme maintenance. 

Answer: Changes in requirements force to modify existing programs. Program maintenance is the modification of a program to take care of changing requirements or any errors found after the program is put to use. 

Question 3: What do you mean by running and debugging of programme. 

Answer: Running and Debugging Programs : Once a program has been written, it has to be tested for its correctness. During this process, we may find errors. In computer terminology, errors are known as bugs, and the process of correcting the errors is known as debugging. 

Question 4: Define syntax error. 

Answer: The grammatical rules of a language are referred to as syntax of that language. If we do not strictly follow the syntax of programming language at the time of writing a program, syntax errors are bound to occur. 


Long Answer Type Questions (4 marks each) 

Question 1: Write the factors on which documentation depend. 

Answer: 

main function and other functions used, and assumptions. 

5. The purpose of every function and their inter-relationships must be described with comments. 

6. Comments are to be inserted in the program wherever necessary for clarity. The purpose of such comments is not to tell how or why something is done, but what is being done. 

Question 2: Explain program maintenance with reference to organization. 

Answer: Program maintenance is an important duty of programmers. It involves all steps from problem definition to program preparation. In certain organizations, programmers can do nothing but maintain the programs. At the initial stage of computerization, an organization’s programming effort mostly goes into the development of new applications. As the number of installed programs grows, the programming effort shifts from program development to program maintenance, in fact, in many organizations, more than half of the programming effort is on program maintenance. An estimate shows that the cost of program maintenance is twice larger than that of initial development. 

Question 3: Explain run time error with example. 

Answer: Run-Time Errors : A program’s syntax may be correct- H may be compiled and linked successfully. But it may not be executed successfully because of run-time errors. Such errors are found at the time of executing the program. Let us consider the following program segment n = 9; 

while (n > 1) { n-1 m = m / (n -1); } 

When the value of n becomes 2, the expression a > 1 is true. 

Hence, the statement n – decreases the value of n by 1. 

When the value of n is 1, Ihe divisor is O’ which 


Answer: A logic error is a defect in the program that causes it to produce an incorrect result, but one that is not so blatant as to be detectable as a runtime error. (A logic error in one part of the program might eventually trigger a runtime error in some other part of the program, but those are separate errors.) 

An example would be a function that is supposed to return the larger of its two arguments but in fact returns the smaller: 

def larger(m, n): if (m > n): return n return m 

Question 5: Write all steps of program solving methodology. [CBSE Text Book] 

Answer: There are following seven steps of program solving methodology: 

1. Problem Definition: Computer programs are written to solve problems posed by humankind. Prior to writing a program, one has to understand a description of the problem to solve. This description may be very precise or vague, but nevertheless, it is necessary /present. Once programmer is sure of what the problem entails, he must write down a list of specifications. Specifications are precise definitons of what the program must do. 

2. Problem Analysis: In this step, the problem has to be fragmented into smaller and manageble parts. The original problem has to be analyzed and divided into a number of sub-problems as these sub-problems are easier to solve and their solutions would become the components of the final problem. Each sub-problem is divided into further smaller ones and this fragmentation has to be continued to achieve simple solutions. The use of modular programming is to get proper solution. 

3. Designing the Problem : Designing the problem can be expressed in the form of: 

(i) Algorithm 

(ii) Flowchart 

(i) Algorithm: An algorithm is a set of instructions that describe a method for solving a problem. It is normally given in mixture of computer code and English Language. This is often called “Pseudocode”. 

programming language. 

5. Program Testing and Debugging : Program testing means running the program, executing all its instructions and testing the logic by entering sample data in order to check the output. Debugging is the process of finding and correcting the errors in the program code. 

6. Documentation : The documentation includes the problem definition, design documents, a description of the test perform, a history of the program development and its different versions and a user’s manual. Such a manual is designed for a native user and illustrates the preparation of input data, running the program and obtaining and interpreting the results. 

7. Program Maintenance : It is not directly part of the original implementation process, but needs special emphasis. All activities that occur after a program operation are part of the program maintenance. Many large programs have long life span that often exceed the lifetime of the hardware they run on. Maintenance is an important part of the life cycle of a program. 

Question 6: What is run-time error, logical error and syntax error? 

Answer: Syntax error : The errors which are traced by the compiler during compilation, due to wrong grammar for the language used in the program, are called syntax errors. 

For example : remainder = a+b// instead of using % operator + operator is used.

The document NCERT Solution - Programming Methodology, Computer Science (Python), Class 11 Notes - Class 11 is a part of Class 11 category.
All you need of Class 11 at this link: Class 11
Use Code STAYHOME200 and get INR 200 additional OFF
Use Coupon Code

Download free EduRev App

Track your progress, build streaks, highlight & save important lessons and more!

Related Searches

Free

,

Computer Science (Python)

,

past year papers

,

Class 11 Notes - Class 11

,

practice quizzes

,

Sample Paper

,

NCERT Solution - Programming Methodology

,

Important questions

,

Semester Notes

,

Class 11 Notes - Class 11

,

shortcuts and tricks

,

MCQs

,

mock tests for examination

,

video lectures

,

Viva Questions

,

pdf

,

study material

,

Class 11 Notes - Class 11

,

Extra Questions

,

Summary

,

Computer Science (Python)

,

Computer Science (Python)

,

NCERT Solution - Programming Methodology

,

ppt

,

Exam

,

Objective type Questions

,

Previous Year Questions with Solutions

,

NCERT Solution - Programming Methodology

;