Tuesday, December 29, 2020

Class-8 Chapter-10 Solved Exercise

 

MCQ

1. d

2. c

3. c

4. c

5. b

 

T/F

1. F

2. T

3. F

4. T

5. F

 

FIB

1. repeating loops

2. While loop

3. membership operator

4. false

5. one

 

Matching

1.  c

2.  d

3.  b

4.  e

5.  a

 

Answer in one word

1. range (start, stop, step)

2. while loop

3. for <variable>in range (intial value, final value, step value):

    loop body(statments to be executed)

4.  While<condition>

loop body(statementes to be executed)

5. A post increment operator is used to increment the value of variable after executing expression completely in which post increment is used.

 

Answer the following

1. For loops are typically used when the number of iteration is non before entering the loop. It is also known as definite loop.

2.  For loops are typically used when the number of iteration is non before entering the loop.  While loop has one control condition, and executes as long as the condition is true.

3.  Python membership operators evaluates if a value exists in a given sequence or not.

4. While<condition>

loop body(statementes to be executed)

 

eg-

i=1

while i<=10:

print (i)

i=i+1  

 

No comments:

Post a Comment