WorksheetsLesson 15 - Test 2
Total questions: 15
Worksheet time: 8mins
Total how many different type of loops are there in python?
0
1
2
3
For checking some condition, What do we need to use?
Iterative statements
jumping statements
conditional statements
None of the above
Which function is used to change the pen size, in turtle module?
pen()
size()
pensize()
sizepen()
For changing speed of drawing in turtle module, which function should be used?
exent()
steps()
move()
speed()
Suppose we want to stop current iteration in a loop, what would be used?
break
continue
pass
All of the above
With which statement you can use break statement ?
condtional statement
iterative statement
declarative statement
All of the above
for I in range(2,2):, how many times this loop will execute ?
0
1
2
Infinite times
For loop in python will work on ?
range
iteration
both
none
How many times print statement will execute?
i=0
For i in range(1,100,2):
print(i)
50
100
101
49
What does the following code print to the console?
Boring
You rock
You rock
Boring
None
Which function is used for changing pointer shape ?
turtle
shape
design
size
Which of the following is a valid for loop in Python?
for(i=0; i<n; i++)
for i in range(0,5):
for i in range(0,5)
for i in range(5)
What will be the output of the following code?
x = 'abcd'
for i in range(len(x)):
print(i)
abcd
0 1 2 3
1 2 3 4
a b c d
Which of the following Boolean expressions is not logically equivalent to the other three?
not(-6<0 or-6>10)
-6>=0 and -6<=10
not(-6<10 or-6==10)
not(-6>10 or-6==10)
In a Python program, a control structure:
Defines program-specific data structures
Directs the order of execution of the statements in the program
Dictates what happens before the program starts and after it terminates
None of the above
