Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
Give this quiz to my class
Q 1/16
Score 0
What do we use to define a block of code in Python language?
30
None of these
Brackets
Indentation
Key
Q 2/16
Score 0
What will be the output of the program?
x = 1
while True:
if x % 5 == 0:
break
print(x)
x + = 1
30
2 1
None of these
error
0 3 1
16 questions
Q.
What do we use to define a block of code in Python language?
1
30 sec
Q.
What will be the output of the program?
x = 1
while True:
if x % 5 == 0:
break
print(x)
x + = 1
2
30 sec
Q.
For tuples and list which is correct?
A - List and tuples both are mutable.
B - List is mutable whereas tuples are immutable.
C - List and tuples both are immutable.
D - List is immutable whereas tuples are mutable.
3
30 sec
Q.
What will be the output of the following code?
x = 'pqrs'
for i in range(len(x)):
x[i].upper()
print (x)
4
30 sec
Q.
When Python is dealing with identifiers, is it case sensitive?
5
30 sec
Q.
The built-in function in Python is:
6
30 sec
Q.
In the following statements of Python, which ones will result into the output: 6?
A = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
7
30 sec
Q.
In Python, find which one isnāt an exception handling keyword.
8
30 sec
Q.
Which statement do you use to create a class in Python?
9
30 sec
Q.
What is the purpose of the āreturnā statement in Python?
10
30 sec
Q.
What is the correct syntax for creating a function in Python?
11
30 sec
Q.
What is the function of āselfā in Python class?
12
30 sec
Q.
What is a dictionary in Python?
13
30 sec
Q.
What is the function of the "pass" statement in Python?
14
30 sec
Q.
What is the result of the following expression: 'abc' * 3?
15
30 sec
Q.
What is the result of the following expression: 'abc' + 3?