No student devices needed. Know more
20 questions
Function range(3) is equivalent to "
range(1,3)
range(0,3)
range(0,3,1)
range(1,3,0)
Consider the following loop given below :
for i in range(5):
print(i)
How many times will this loop run ?
5
0
infinite
Error
What is the output of the following code?
for word in "Jump Statement":
if word == "u":
break
print (word, end='')
Jump Statement
Jump
J
Ju
Predict the output of following code
for word in "Jump Statement":
if word == "e":
continue
print (word, end='')
Jump Statement
Jump Statmnt
Jump
Statmnt
Which of the following jump statement is used to terminate the loop?
continue
goto
pass
break
Which of the following function is used in python for loop to specify the initial, final and increment values?
range
format
input
The condition in the statement should be in the form of
Arithmetic r relational expression
Arithmetic or Logical expression
Relational or Logical expression
Arithmetic
_____ statement is used to skip the remaining part of the loop and start with next iteration.
Pass
break
continue
range
Name the two types of loops.
For,While
While,if
For,if
if,if else
Choose the output.
for i in range (10,13):
print (i*i)
100
121
144
100
121
144
169
100
121
100
169
Name the two membership operators in python.
in, in not
in, not in
Check the output.
Print(10 in [1,2,3,4,10,12])
true
false
The for loop is used when we are sure about how many times a loop body will be executed. It is also known as___
Definite loop
Indefinite loop
How do you write a Less than or equal to Relational operator
<=
=<
>=
=>
Is python an interpreter or compiler programming language?
Compiler
Interpreter
Explore all questions with a free account