PrimeGyan
Home
O Level
M1-R5
M2-R5
M3-R5
M4-R5
CCC
Programming
Online Test
Hindi
Home
Online-test
Test
Python-practice-set-8
13
Python Practice Set 8
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 8
1.
What is the char data type in Python language?
True
False
2.
When the same function is called inside a function, then it is called.
Recursive function
Predefine function
User define function
None of these
3.
/* */ is used to enter comments in Python code.
True
False
4.
What is a function called when it is defined inside a class?
Module
Class
Another Function
method
5.
_______ provides a pictorial representation of the given problem.
Algorithm
Flowchart
Pseudocode
All of these
6.
Which of the following is an invalid variable?
my_string_1
1st_string
foo
_
7.
What is the type of each element in sys.argv?
set
list
tuple
string
8.
What is the symbol used for below in Python?
connector
input/output
decision
processing
9.
Which of the following statements is true?
Python is a high level programming language.
Python is an interpreted language.
Python is an object-oriented language
All of the above
10.
What is the answer to this expression 22%3
0
1
2
3
11.
Which of the following is not a keyword in python language?
True
and
switch
def
12.
What is a variable defined outside a function called?
A static variable
A global variable
A local variable
An automatic variable
13.
What will be the output of the following python code print(2**3)
6
5
8
27
14.
Which of the following sorts the elements of tuple?
sorted(tuple)
tuple.sorted()
sort(tuple)
tuple.sort()
15.
Which of the following operators can be used on tuples?
**
*
%
//
16.
Which of the following is used to create an empty set?
()
[]
{}
set()
17.
All keywords in Python are in _________
Capitalized
lower case
UPPER CASE
None of the mentioned
18.
Python supports the creation of anonymous functions at runtime, using a construct called __________
pi
anonymous
lambda
None of the mentioned
19.
Which of the following functions is a built-in function in python?
factorial()
print()
seed()
sqrt()
20.
Which of these is the definition for packages in Python?
A folder of python modules
A set of main modules
A set of programs making use of Python modules
A number of files containing Python definitions and statements
21.
Which module in the python standard library parses options received from the command line?
getarg
os
main
getopt
22.
What is output of print(math.pow(3, 2))?
9.0
None
9
None of the mentioned
23.
Which of the following functions clears the regular expression cache?
re.sub()
re.pos()
re.purge()
re.subn()
24.
Which statement will read 5 characters from a file(file object âfâ)?
f.read()
f.read(5)
f.reads(5)
None of the above
25.
Which function open file in python?
opens( )
open( )
Open( )
None of the above
Submitting..
Welcome To PrimeGyan
Start test
Download