jagomart
digital resources
picture1_2022 01 17 Viii Computer 1


 151x       Filetype PDF       File size 0.19 MB       Source: www.stfrancisschool.edu.in


File: 2022 01 17 Viii Computer 1
chapter 8 looping statements in python exercises q1 short answer questions 1 what is loop ans loop is a sequence of instructions that is continually repeated until a certain condition ...

icon picture PDF Filetype PDF | Posted on 08 Feb 2023 | 2 years ago
Partial capture of text on file.
                      CHAPTER – 8  
                Looping statements in python 
                      EXERCISES 
       Q1.SHORT ANSWER QUESTIONS 
       1. What is Loop? 
       Ans: Loop is a  sequence of instructions that is continually repeated until a certain condition is 
       met. 
       2. What is loop index? 
       Ans: The iterating variable , which is located after the keyword FOR is called the loop index. 
       3. What is the role of else statement in the while loop? 
       Ans: The role of else statement with a while loop is executed when the condition or expression 
       associated with the while statement becomes FALSE. 
       4. what is Infinite loop? 
       Ans: A loop becomes infinite loop if a condition never becomes FALSE.This results in a loop that 
       never ends.Such a loop is called an infinite loop. 
       5. Describe a list? 
       Ans: List is a sequence data type . It is a series of values which are assigned by placing them in 
       square brackets and separating them by commas. 
       Q2. LONG ANSWER QUESTIONS: 
       1. What is the While loop?Describe. 
       Ans: A while loop is a looping structure, which executes a set of statements in a program a 
       certain number of times.The else statement is executed when the condition becomes FALSE. 
       Syntax is- 
       While expression: 
          Statements 
       Else: 
          statements 
       2. Explain the FOR loop? 
       Ans: A For loop is another looping structure.It allows to execute a set a statements in a program 
       a certain number of times. 
       Syntax is- 
       For  in  
          Statements 
       Else: 
          statements 
       3. What is a Nested Loop? 
       Ans: A Nested loop refers to a loop structure in which one loop is placed inside another 
       loop.when a loop is present inside another loop, it is called an inner loop.the loop that lies 
       outside is called an outer loop. 
       In a nested loop, the inner loop must be exceuted before the outer loop and the inner loop 
       must end before the outer loop. 
       5.  Write one word for the following : 
       a. It is a series of values which are assigned by placing them in square brackets and separating 
       them by commas. 
       Ans: LIST 
       b. It is located after the for keyword and called the loop index. 
       Ans: iterating variable 
       c. It causes a section of your program to be repeated a certain number of times. 
       Ans: Loop 
       d. It is the last number of range where the range of a for loop will end. 
       Ans: Stop 
         
The words contained in this file might help you see if this file matches what you are looking for:

...Chapter looping statements in python exercises q short answer questions what is loop ans a sequence of instructions that continually repeated until certain condition met index the iterating variable which located after keyword for called role else statement while with executed when or expression associated becomes false infinite if never this results ends such an describe list data type it series values are assigned by placing them square brackets and separating commas long structure executes set program number times syntax explain another allows to execute nested refers one placed inside present inner lies outside outer must be exceuted before end write word following b c causes section your d last range where will stop...

no reviews yet
Please Login to review.