NEW
Font size
WorksheetsPYTHON QUIZ - DAY 2
Total questions: 15
Worksheet time: 8mins
Which of the following is the correct definition of a variable in Python?
A variable is a reserved memory location to store values.
A variable is a fixed value that cannot change.
A variable is a type of function in Python.
A variable is used to perform arithmetic operations.
What is the value of x after executing x = 5 and then x = 10?
5
10
15
0
Which of the following variable names is not valid in Python?
my_var
_myvar
2myvar
myVar2
How do you write a single-line comment in Python?
/* This is a comment */
# This is a comment
<!-- This is a comment -->
// This is a comment
Which of the following is a correct way to write a multi-line comment in Python?
/* This is a multi-line comment */
'''This is a multi-line comment '''
<!-- This is a multi-line comment -->
# This is a multi-line comment
What is a token in Python?
A token is a special type of function.
A token is the smallest unit in a program.
A token is a part of a loop.
A token is a type of variable.
Which of the following is not a type of token in Python?
Keyword
Identifier
Operator
Array
How many keywords are there in Python 3.8?
33
35
37
39
Which of the following is not a keyword in Python?
define
Which of the following is not an arithmetic operator in Python?
+
-
*
==
Which of the following operators is used for floor division in Python?
**
/
What will be the result of 5 % 2 in Python?
0
Which of the following is a logical operator in Python?
=
%
*
Which of the following operators is used to compare two values in Python?
==
=
><
!=
Which of the following is a bitwise operator in Python?
not
&
and
