Page 118 - Trackpad_V5_Book 8
P. 118
b. What is the if-elif-else statement used for? Write its syntax.
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
c. Write the syntax of the following:
(i) While Loop
______________________________________________________________________________
______________________________________________________________________________
(ii) Nested if statements
______________________________________________________________________________
______________________________________________________________________________
d. What are jump statements? Define the jump statements used in Python.
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
21 st
5. Competency-based/Application-based questions: Century #Experiential Learning
Skills
a. Shweta was writing a program in which she wanted to execute a particular set of
statements depending upon a particular test condition. Which type of statements can
she use for this?
______________________________________________________________________________
b. Swara wants to repeat a block of statements for a given number of times, until the control condition
is false. Which type of construct can she use for this? Write its syntax.
______________________________________________________________________________
c. Manvi wants to write a statement which will cause the program to skip the rest of the statement of
the current block and to move to the next iteration of the loop. Which statement should she use for
this?
______________________________________________________________________________
6. Write the output of the following codes in Python.
a. l = 29
m = 29
if m > l:
print(“m is greater than l”)
elif l == m:
print(“l and m are equal”)
______________________________________________________________________________
116 Pro (Ver. 5.0)-VIII

