PrimeGyan
Home
O Level
M1-R5
M2-R5
M3-R5
M4-R5
CCC
Programming
Online Test
Hindi
Home
Online-test
Test
Python-practice-set-9
13
Python Practice Set 9
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 9
1.
What will be the output of the following Python function? all([2,4,0,6])
Error
True
False
2.
_______ is part of user documentation.
Class diagram
Use case
Code comment
Installation guide
3.
What does os.close(f) do?
terminate the process f
terminate the process f if f is not responding
close the file descriptor f
return an integer telling how close the file pointer is to the end of file
4.
A named sequence of statements is known as which of the following?
definition
method
function
module
5.
Which Python function is used to display text?
println()
print()
display()
font(text, x, y)
6.
Which of the following can be used to create a directory?
os.mkdir()
os.creat_dir()
os.create_dir()
os.make_dir()
7.
What is the purpose of the def keyword in python?
It is term that means the code is interesting.
Indicates the start of a function
It indicated that the following indented section of code is to be stored for later
B and C are both true
8.
What will be the output of the following Python function? sum(2,4,6) sum([1,2,3])
Error, Error
12, 6
12, Error
Error, 6
9.
How is a function declared in python?
declare function function_name():
def function_name():
def function function_name():
declare function_name():
10.
Python uses:
compiler
assembler
interpreter
Linker only
11.
what does this code prints out? print(int(33.7))
34.0
34
33.70
33
12.
CSV stands for
comma string values
comma sequence values
comma separated values
comma segregated values
13.
What is a recursive function?
A function which calls itself.
A function that calls other functions.
Both A and B
None
14.
Which character is always at the end of a function declartion?
a curly bracket }
a colon :
a semi ;
a square bracket ]
15.
Linus Torvalds developed which system?
Unix
iOS
Linux
Windows
16.
Which of the following function stacks 1D arrays as columns into a 2D array?
column_stack
row_stack
com_stack
All of the mentioned
17.
Which of the following method creates a new array object that looks at the same data?
view
paste
copy
All of the mentioned
18.
NumPy developed by
Guido van rossum
Denis ritchie
Travis Oliphant
None of the above
19.
python pandas was developed by______
Guido Van Rossum
Travis Oliphant
Wes McKinney
James Gosling
20.
Which of the following option is true? fp.seek(10, 1)
Move file pointer ten characters behind from the current position.
Move file pointer ten characters ahead from the beginning of a file
Move file pointer ten characters behind ahead from the end of a file.
Move file pointer ten characters ahead from the current position.
Submitting..
Welcome To PrimeGyan
Start test
Download