This page contains the

**CBSE class 11 Computer Science with Python chapter 1, Algorithms and Flowcharts**. You can find the questions/answers/solutions for the**chapter 1**of Unit 2 of**CBSE class 11 Computer Science with Python**in this page.Multiple Choice Questions

1. A step by step method for solving a problem using English Language

(a)

program

(b)

Flowchart

(c)

statement

(d)

Algorithm ✔

2. Set of statements is executed based upon conditional test.

(a)

Looping

(b)

Selective ✔

(c)

Sequence

(d)

None

3. Set of statements is executed again and again based upon conditional test.

(a)

Looping ✔

(b)

Selective

(c)

Sequence

(d)

None

4. The graphical representation of algorithm is

(a)

program

(b)

Flowchart ✔

(c)

statement

(d)

Algorithm

5. All instructions are executed one after other.

(a)

Looping

(b)

Selective

(c)

Sequence ✔

(d)

None

Answer the following questions.

1. Define Algorithm.

An algorithm is a step-by-step procedure or a set of rules for solving a specific problem or accomplishing a particular task. In computing, algorithms form the backbone of program design, and they are written in pseudocode or a flowchart before being implemented in a specific programming language.

2. Define Flowchart.

A flowchart is a graphical representation of an algorithm or a process. It uses different shapes and symbols to denote different types of instructions or paths. It helps in understanding the logical sequence and the control flow of the algorithm.

3. Write an algorithm to find the sum of two numbers.

The following is the algorithm to find the sum of two numbers.

Step 1:

Start

Step 2:

Take the two numbers and store them as A and B

Step 3:

Add A and B and store them as Sum

Step 4:

Print the Sum

Step 5:

Stop

4. Write an algorithm to find the area of a triangle.

The following is the algorithm to find the area of a triangle.

Step 1:

Start

Step 2:

Take base and height and store them as B and H?

Step 3:

Find the area using {\text{area} = \dfrac{1}{2} × \text{B} × \text{H}}

Step 4:

Print area

Step 5:

Stop

5. Write an algorithm to find whether given number is odd or even.

The following is the algorithm to find whether a given number is odd or even.

Step 1:

Start

Step 2:

Input number N

Step 3:

Check N modulo 2 (or N % 2 = 0). If it is equals 0, then goto Step 4, Otherwise go to Step 5.

Step 4:

Print “even” and go to Step 6

Step 5:

Print “odd”

Step 6:

Stop

6. Write an algorithm to find the sum of all even numbers up to given number.

The following is the algorithm to find the sum of all even numbers up to given number.

Method 1: Consider all the numbers upto the given number by incrementing each by 1.

Step 1:

Start

Step 2:

Take any number and store it in N.

Step 3:

Store 0 in I and store 0 in Sum.

Step 4:

Find I modulus 2 (or I % 2). If I modulus 2 equals 0 Go To Step 5, Otherwise Go To Step 6

Step 5:

Add I to Sum.

Step 6:

Increment I by 1

Step 7:

If I ≤ N Go To Step 4. Otherwise Go To Step 8

Step 8:

Stop

Method 2: Consider all the even numbers upto the given number by incrementing each by 2.

Step 1:

Start

Step 2:

Take any number and store it in N.

Step 3:

Store 0 in I and store 0 in Sum.

Step 4:

Add I to Sum

Step 5:

Increment I by 2

Step 6:

If I ≤ N Go To Step 4. Otherwise Go To Step 7

Step 7:

Stop

7. Draw a flowchart to find the area of a circle.

The following is the flowchart to find the area of a circle.

Flow Chart to find the area of circle.

9 8. Draw a flowchart to find the smallest number among n numbers.

The following is the flowchart to find the smallest number among n numbers.

Flow Chart to find the smallest number among n numbers.

10. 9. Draw a flowchart to find the sum of all multiples of 5 up to given number.

The following is the flowchart to find the sum of all multiples of 5 up to a given number n numbers.

Flow Chart to find the sum of all multiples of 5 up to a given number n numbers.

11 10. Mona is confused about finite loop and infinite loop, explain her with the help of example.

Finite loop is a loop that executes a specific number of times. For example, printing numbers from 1 to 10.

In contrast, an infinite loop is a loop that continues indefinitely because

●

it lacks a functional incremental statement

●

or a proper condition to terminate it.

For example, a loop that keeps printing “Hello” without any condition to stop it.

12 11. Write an algorithm and a flowchart to find sum of n numbers.

Note: It is not specified in the problem whether we need to find the sum of n natural numbers or n different numbers. So, we’ve provided below flowcharts for both the cases.

1. a) Algorithm to find the sum of n natural numbers:

Step 1:

Start

Step 2:

Input number N

Step 3:

Initialize I as 1 and Sum as 0

Step 4:

Check whether I is less than or equal to N. If Yes, Go to Step step 5, Otherwise Go to Step 7.

Step 5:

Add I to Sum..

Step 6:

Increment I by 1. Go to Step 4

Step 7:

Print Sum

Step 8:

Stop

1. b) Flowchart to find the sum of n natural numbers.

Flow Chart to find the sum of n natural numbers.

2. a) Algorithm to find the sum of n numbers:

Step 1:

Start

Step 2:

Input number N

Step 3:

Initialize I as 1 and Sum as 0

Step 4:

Check whether I is less than or equal to N. If Yes, Go to Step step 5, Otherwise Go to Step 8.

Step 5:

Input number A

Step 6:

Add A to Sum..

Step 7:

Increment I by 1. Go to Step 4

Step 8:

Print Sum

Step 9:

Stop

2. b) Flowchart to find the sum of n numbers.

Flow Chart to find the sum of n numbers.