Font size
WorksheetsPython - Quiz 2
Total questions: 20
Worksheet time: 9mins
Choose the immutable data types
Dictionary
Tuple
List
String
Which of the following operator is used for checking the equality ?
=
= =
both = and = =
equal to
Which of the following is a mutable data type ?
Dictionary
List
String
int
Name the function for finding the memory location of a variable.
(a)
Name the function used for finding the data type of a variable.
(a)
Which of the following comments are valid ?
"""have a
nice day"""
'have a nice day'
"have a nice day"
#have a nice day
15%3
(a)
17//5
(a)
Choose the operator that calculates the quotient
&
**
%
/
Which operator has the highest precedence ?
%
//
/
**
False and True
True
False
Which of the following is a logical operator?
not
And
or
Or
a/=b is same as ?
b=a/b
a=b/a
a=a/b
b=b/a
Name the type of operator >=
Logical
Relational
Assignment
Arithmetic
Name the type of operator /=
Logical
Relational
Assignment
Arithmetic
Name the type of operator =
Logical
Relational
Assignment
Arithmetic
This type of error gives an undesirable output
Logical Error
Runtime Error
Syntax Error
_______ error occurs when the rules of the programming language is violated.
Runtime
Syntax
Logical
Which of the following gives a syntax error in Python?
100=a
a=102
print 7+3
Print 7
This type of conversion is done automatically without the programmer's intervention.
Explicit Type Conversion
Coercion
Type Casting
Implicit Type Conversion
