PrimeGyan
Home
O Level
M1-R5
M2-R5
M3-R5
M4-R5
CCC
Programming
Online Test
Hindi
Home
Online-test
Test
Python-practice-set-3
13
Python Practice Set 3
Python Practice Set 1
Python Practice Set 2
Python Practice Set 3
Python Practice Set 4
Python Practice Set 5
Python Practice Set 6
Python Practice Set 7
Python Practice Set 8
Python Practice Set 9
Python Practice Set 3
1.
What is user defined data type in Python?
string
integer
character
class
2.
Which code does the compiler convert the Python source code?
Machine Code
System Code
Byte Code
Assembly Code
3.
Which is used to write block of code in Python?
Curly bracket
Square bracket
Indentation
All of the Above
4.
The elements of which data structure cannot be changed in Python?
List
Tuple
Set
Both b and c
5.
In Python, can we create a tuple without round bracket ( )?
True
False
6.
Which syntax does not create a tuple?
tpl = (10)
tpl = 100,
tpl = 100,20,300,
tpl = (100,1,200)
7.
Which of the following is not a feature of dictionary data structure?
Indexing
Value duplicate
Mutable
Heterogeneous data
8.
Which operator works similar to has_key() in python?
is operator
in operator
is not operator
All of the above
9.
If the key is not found in a dictionary, then what does the get() method return?
0
Error
-1
None
10.
Which method is used to remove all the items in the dictionary?
remove()
removeAll()
delete()
clear()
11.
What does popitem() method return in dictionary?
only key
only value
key and its value
-1
12.
The maximum number of arguments that can be given to slice a string?
1
2
6
3
13.
What is the correct order of passing arguments in Slicing?
[end:step:start]
[start:end:step]
[start:step:end]
[step:start:end]
14.
To which data structure does the slicing concept apply?
dictionary
list
Set
All of the above
15.
What is the default value of step in slicing?
-1
0
1-2
1
16.
In python, when a function returns multiple values, in which data structure are those values stored?
dictionary
list
tuple
array
17.
How can a doc string be accessed in Python?
function_name.doc()
function_name.docString()
function_name.__doc__
function_name.docStr()
18.
The maximum number of arguments the find() method can take?
4
2
3
1
19.
Which of the following cannot be a variable?
raja_rani
__init__
elif
examjila
20.
How are operators with the same value precedence evaluated?
Left to Right
Right to Left
Can’t say
None of the mentioned
21.
Which of the following expression has highest precedence?
Exponential
Addition
Parentheses
Multiplication
22.
What is the output of print(0.1 + 0.2 == 0.3) ?
True
False
23.
What is the output of print(0.1 + 0.2 > 0.3) ?
True
False
24.
What is the maximum possible length of an identifier?
8
32
63
None of these above
25.
What do we use to define a block of code in Python language?
Key/Semicolon
Brackets
Indentation
None of these
Submitting..
Welcome To PrimeGyan
Start test
Download