Page 106 - TrackpadV5.1_class8
P. 106
21 st
Century #Flexibility
Self Reflection Skills
A computer program is made up of a set of instructions. It blindly follows all the instructions that are given
Self Reflection
to it to perform a set of desired actions. Do you think humans work the same way or do they sometimes
question the instructions given to them? Elaborate.
Hashtag
#Indented: The way you follow to organise and document your source code
#Iteration: Repetition of an action
REVISIT
A control structure is a programming language construct which affects the flow of the execution of a
program.
The statements that are executed in sequential order, i.e. one after the other without any jumps, are called
sequential statements.
When programmers are required to execute a particular set of statements depending upon a particular test
condition, a branching statement is required.
1. Tick ( ) the correct option.
a. Which of the following is a selection statement in Python?
(i) for loop (ii) while loop
(iii) if statement (iv) continue statement
b. What will be the output of the following code?
x = 10
if x > 5:
print("Greater")
else:
print("Smaller")
(i) Smaller (ii) Greater
(iii) Error (iv) None of these
104 Pro (V5.1)-VIII

