stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
PYTHON MODEL-EXAM Flashcards | StudBud
Explore
/
PYTHON MODEL-EXAM
PYTHON MODEL-EXAM
50 terms
·
StudBud Administration
·
1,404 plays
Imported from external platform
Flashcards
50 cards
F
Practice quiz
P
Host live
L
Questions
50
Answers
1
Which of the following is not a declaration of a dicitionary?
{}
dict([[1,”A”],[2,”B”]])
{1,”A”,2”B”}
{1: ‘A’, 2: ‘B’}
2
Which is not a core data type
tuple
list
class
dict
3
What is the output of print(type(t)) if t=(“hello”)
Empty choice
Empty choice
Empty choice
Empty choice
4
WHAT IS PYTHON MOST COMMONLY USED FOR
Database Management
E-Commerce
Enterprise Development
Web Programming
5
Which function needs a dictionary of array like sequences or a dictionary of another dictionary, to return a DataFrame
DataFrame.from_dict
Dataframe.from_lists
DataFrame.from_items
DataFrame.from_records
6
What is the output of print( L.index(8)) if L=[3,8,1,6,0,8,4]
1
-2
5
2
7
What is answer of this expression 22%3 is?
3
1
0
7
8
Way to install the pandas library
pandas install python
python install pandas
pip install pandas
install pandas
9
Which of the following thing can be data in the pandas
pythondict
all the above
ndarray
scalarvalue
10
What is the output of expression 3*1**3?
27
3
9
1
11
Which operator is used in Python to import modules from packages?
*
.
>
&
12
Which of the following function headers is correct?
def fun(a = 2, b = 3, c)
def fun(a, b = 2, c = 3)
def fun(a = 2, b, c = 3)
def fun(a, b, c = 3, d)
13
_______is output of print([i.lower() for i in "HELLO"])
['hello']
hello
[‘h’, ‘e’, ‘l’, ‘l’, ‘o’].
hello'
14
What type of language python
Assemply language
Desktop language
low level language
high level scripting
15
Data structures in Pandas can be mutated in the terms of ____ but not of _____.
Size,Semantic
Value,size
Size,value
Semantic,size
16
What is a variable defined outside a function referred to as?
global variable
automatic variable
static variable
local variable
17
Which of the following is not a keyword of python
lambda
dict
Export
def
18
Dataframe in pandas is
3D array
multi dimensionalarray
1D Array
2D array
19
Which of the following items are present in the function header?
function name only
return type
header
function name,parameter list
20
Minimum no.of arguments required to pass in pandas series
1
0
3
2
21
which function from the options given below can read the dataset from a large text file?
Read_ison
Read_pickle
Read_csv
Read_hdf
22
Which of the following are the unconditional control statements in python
continue
loop
for-each
for
23
What we pass in dataframe in pandas
panda series
float
integer
string
24
Correct syntax of the reshape() function in numpy array in python is
Reshape(shape)
Reshape(shape,array)
Reshape(array,shape)
Array,reshape(shape)
25
What is the maximum possible length of an identifier?
99
39
79
89
26
Which function is find the length of the string?
length()
Stringlength()
Strlen()
len()
27
What is the output of the following code? print(chr(ord(chr(97))))
A
a
error
97
28
Find ERROR, Suppose dict1={"a":1,"b":2,"c":3}
dict1["a"]=5
print dict1
print(dict1.get("b"))
print(len(dict1))
29
Series in pandas is
1D Array
multi dimensionalarray
3D array
2D array
30
Suppose list1 is [3, 5, 25, 1, 3], what is min(list1) ?
3
1
25
5
31
In which part of memory does the system stores the parameter and local variables of funtion call?.
uninitialized data segment
heap
Datasegment
stack
32
What is the output of [‘Hi!’] * 4
‘Hi!’, ‘Hi!’, ‘Hi!’, ‘Hi!’
[‘Hi!’] [‘Hi!’] [‘Hi!’] [‘Hi!’]
[‘Hi!’, ‘Hi!’, ‘Hi!’, ‘Hi!’]
HI!
33
Which of the following are the functions arguments in python
general
fixed
required
static
34
Which is in numpy package
List
Object
Fourier Transform
Fundamental package for data analysis
35
FILE is of type --------------
string type
float type
int type
struct type
36
output of hex(15) is ____________
oxF
oXf
oxf
o
37
If return statement is not used inside the function, the function will return:
arbitrary value
0
null
none
38
What is called when a function is defined inside a class?
Method
Class
Another Function
Module
39
Which of the following mode argument is used to truncate?
a
f
w
t
40
What happens to the indexes when any operations are done to unaligned series?
Sum
Union
Intersection
Total
41
Analyze the data in pandas with
all the above
series
panel
dataframe
42
What is the output of print( L.count(8)) if L=[3,8,1,6,0,8,4]
1
-5
2
5
43
What is the output of print(t[-1]) if t=(‘p’,’y’,’t’,’h’,’o’,’n’)
N
P
O
Y
44
Syntax of constructor in python is
Def_init_()
Def_init()
_int_()
Def__init__()
45
Which keyword is use for function?
define
fun
function
Def
46
This function in the library of Pandas allows you to manipulate data and create new variables------------
pivot function
Read_csv function
merge function
apply function
47
Which of the following true about FILE *fp
File is a stream
File is buffered stream
FILE is structure & *fp is file type
FILE is a keyword &*fp is a variable
48
Which of these about a dictionary is false
The keys of a dictionary can be accessed using values
Dictionary is mutable
Dictionaries ar not ordered
The values of a dictionary can be accessed using keys
49
In data science,which of the python library was more popular
Opencv
piango
numpy
pandas
50
Which of these is an invalid writer function in pandas
To_stata
To_text
To_clipord
To_msgpack