Page 113 - Code Craft Computer-7
P. 113
3. Which of the following is not the conditional statement in Python?
a. if Statement b. if else Statement
c. if...elif...else Statement d. None of these 3. a b c d
4. What is the answer of the expression, 2**2**2?
a. 2 b. 16
4. a b c d
c. 4 d. 8
5. If a = 20 and b = 10, then what will be the output of the following code:
5. a b c d
if (false):
print(a + b)
else :
print (a - b)
a. 30 b. 20
c. 10 d. Nothing will print
B. Gap-fill exercise.
1. The ____________ statement is the simplest conditional statement.
2. In Python, the non-zero value is interpreted as ____________.
3. Decision statements may give the results true or ____________.
4. The ____________ block will be executed if and only if the provided condition evaluates to false.
C. True and False assessment.
1. The if...elif...else statement follows a top-down approach.
2. Python does not allow nested if statement.
3. The if...elif...else ladder not a conditional statement in Python.
4. The if statement executes a command if the provided condition evaluates to true.
5. The if...elif...else statement allows you to test only one condition.
D. Give appropriate responses to the questions.
1. What is decision making statement?
2. Write the syntax for the if...elif...else statement.
3. Write the syntax of the if statement.
4. What is the difference between if and if...else statements?
Analyt ical Skills
Competency Based Questions
1. You were writing a program in which you wanted to execute a particular set of statements
depending upon a particular test condition. Which type of statement will you use for this?
113

