Assignment
Class:11 Subject: COMPUTER SCIENCE
UNIT II – ALGORITHMIC PROBLEM SOLVING
CHAPTER – 6: SPECIFICATION AND ABSTRACTION
Part-A
I.One Mark Questions
1. ________ is a step-by-step sequence of statements to solve a problem?
a) Algorithm b) Statement
c) Definition d) Abstraction
2. Which of the following activities is not algorithmic in nature?
a) Multiply two numbers b) Draw a Kolam
c) Walk in the park d) Swapping of two numbers
3. Omitting details inessential to the task and representing only the essential
features of the task is known as …………?
a) Specification b) Abstraction
c) Composition d) Decomposition
4. Stating the input property and the input-output relation a problem is
known as ………….?
a) Specification b) Statement
c) Algorithm d) Definition
5. if i=5 before the assignment i := i-1 after the assignment, the value of i is
………….?
a) 5 b) 4
c) 3 d) 2
6. ------------- was a Hungarian mathematician?
a) Charles Babbage b) G.Polya
c) Dennis Ritche d) Rick Masciti
7. Instruction of a computer are also known as ………….?
a) Statements b) Operators
c) Algorithm d) Data
8. …………. of an algorithm is a contract between the designer and users of the
algorithm?
a) Statement b) Specification
c) Abstraction d) Decomposition
9. The parts of an algorithm are known as …………?
a) Abstraction b) Functions
c) Data hiding d) Specification
10. A double dash – indicates that the rest of the line is a ……….?
a) Comment b) Statement
c) Input d) Algorithm
Part-B
II.Very Short Answer.
1. Define an algorithm.
2. Distinguish between an algorithm and a process.
3. Specify a function to find the minimum of two numbers.
4. What is a variable?
5. Write any three control flow statements.
Part-C
III. Short Answer.
1. What is the format of the specification of an algorithm?
2. What is Abstraction?
3. How is state represented in algorithms?
4. What is the form and meaning of assignment statement?
5. What is the difference between assignment operator and equality operator?
Part-D
IV.Write in detail.
1. Explain building blocks of algorithm.
2. Explain basic principles and techniques for designing algorithms.
UNIT II – ALGORITHMIC PROBLEM SOLVING
CHAPTER – 7: COMPOSITION AND DECOMPOSITION
Part-A
I.One Mark Questions
1. _______ is a diagrammatic notation for representing algorithms?
a) Flow chart b) Algorithm
c) Pseudo code d) Statement
2. In a Flowchart the statement contained in a …………….?
a) Triangle b) Rectangular box
c) Square box d) Circle
3. How many times the loop is iterated?
i:=0
while i≠5
i:=i+1
a) 4 b) 5
c) 6 d) 0
4. A function is like a …………. ?
a) Sub- algorithm b) Pseudo code
c) Main algorithm d) Problem
5. C++ is a ………….. ?
a) Programming language b) Assembly language
c) Machine language d) Natural language
6. Control flow statements are …………… ?
a) Sequential b) Alternative
c) Iterative d) All the above
7. Which code is a mix of programming language?
a) Pseudo code b) Algorithm
c) Flow chart d) Statement
8. Statements composed of other statements are known as …………… ?
a) Statements b) Compound statements
c) Assignment statement d) Sequential statement
9. Parallelogram boxes represent ---------- given and output produced?
a) Inputs b) Output
c) start d) End
10. Iterative statement is commonly known as a
a) Loop b) case
c) Condition d) Specification
Part-B
II.Very Short Answer.
1. Distinguish between a condition and a statement.
2. Draw a flowchart for conditional statement.
3. What is the difference between an algorithm and a program?
4. Name some programming languages.
5. What are the types of control flow statements?
Part-C
III. Short Answer.
1. Write short notes on: Notations for algorithms.
2. Write about sequential statement.
3. Draw any four Flow chart symbols.
4. What is case analysis?
5. Define iterative statement.
Part-D
IV.Write in detail.
1. Explain conditional statement.
2. Explain flow chart.
UNIT II – ALGORITHMIC PROBLEM SOLVING
CHAPTER-8: ITERATION AND RECURSION
Part-A
I.One Mark Questions
1. _______ is an algorithm design technique closely related to induction ?
a) Recursion b) Iteration
c) Loop d) Flowchart
2. ________ invariant is the key to construct and to reason about the properties
of the variables at these points?
a) Case b) Loop
c) Iteration d) Recursion
3. Recursive solver has ------------ cases?
a) 3 b) 4
c) 0 d) 2
4. power(10,4)= ------------?
a) 125 b) 32
c) 10000 d) 25
5. if m×a+n×b is an invariant for the assignment a,b:=a+8,b+7, the values of m
and n are ……… ?
a) m=8, n=7 b) m=7,n=-8
c) m=7, n=8 d) m=8, n=-7
6. A loop invariant need not be true ……….?
a) At the start of the loop b) At the start of the each iteration
c) At the end of each iteration d) At the start of the algorithm
7. Recursion must have atleast …………?
a) one base case b) two base case
c) Three base case d) Four base case
8. Recursion is an …………. design technique ?
a) Algorithm b) Flow chart
c) Pseudo code d) Program
9. A …………… is a phrase that comments the computer to do an action ?
a) statement b) algorithm
c) flow chart d) program
10. In recursion, the size of input to a sub-problem must be strictly ………. size
of the given input ?
a) Greater than b) Smaller than
c) Equal d) none
Part-B
II.Very Short Answer.
1. What is invariant?
2. Define a loop invariant.
3. What is the relationship between loop invariant, loop condition and the
input output recursively?
4. What is recursive problem solving?
5. Define iteration.
Part-C
III. Short Answer.
1. How to construct a loop?
2. Explain recursive solver
3. Define factorial of a natural number recursively
4. Give an example of recursion.
5. Does testing the loop condition affect the loop invariant? why?
Part-D
IV.Write in detail.
1. Explain Recursion
2. Briefly explain Invariants.