Unit 2
Unit 2
Q 1. Identify whether the given problems are Decision Problems, Counting Problems or
Search Problems. Write your answer in front of each problem given below:
b. Flipping a coin results in Head or tails. I flip a coin 20 times, how many different sequences of
heads and tails are possible?
d. How many ways can the letters of the word TRIANGLE be arranged? Counting Problem
e. N-queens problem: where the goal is to place eight queens on a chessboard such that no queen
attacks any other.
Q 2. A student has to take one course in physics, one in science and one in mathematics.
He may choose one of 3 physics courses (P1, P2, P3), one of 2 science courses (S1, S2) and
one of 2 mathematics courses (M1, M2). In how many ways can this student select the 3
courses he has to take?
Q 3. Create an IPO chart which will accept the ages of four boys and calculate their total age
and average age. The program must display both the total age and the average age.
4. Create an IPO chart of a scenario that allows a user to enter two numbers. The operation
to be performed is either addition, subtraction, multiplication or division and accordingly the
output should be given to the user.
Q 5. The child wants to plan a birthday party for their friend. a) Draw an IPO chart of this
situation. b) Write down properties of computation thinking.
a) IPO Chart for Planning a Birthday Party:
3. Computational thinking is
a) Programming
b) Thinking like a computer
c) Coding
d) Logically solving problems