Page 118 - Trackpad_V1_Book 8_Flipbook
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.
____________________________________________________________________________
____________________________________________________________________________
____________________________________________________________________________
5. Application based questions: Experiential Learning
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 that 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: Critical Thinking
a. l = 29
m = 29
if m > l:
print(“m is greater than l”)
elif l == m:
print(“l and m are equal”)
____________________________________________________________________________
116 Trackpad (Version 1.0)-VIII

