Font size
Worksheetspython test no 1
Total questions: 30
Worksheet time: 3600secs
Which Python library runs a function as thread?
None
_threading
threading
thread
How does run() method is invoked?
By Thread.run()
By Thread.start()
By Thread.create()
None
Which method is used to identify a thread?
getThread()
None
getName()
get_ident()
How does global value mutation used for thread-safety?
via GIL (Global Interpreter Lock)
via Locking
via Mutex
None
What is the method to retrieve the list of all active threads?
getList()
getThreads()
enumerate()
threads()
Which thread method is used to wait until it terminates?
waitforthread()
join()
None
wait()
Race conditions are …
Two threads incorrectly accessing a shared resource
Testing which thread completes first
Something you should add to your code
The weather on race day
Full form of API
Application Process Interchange
Application Programs Interchange
Application Process Interface
Application Programming Interface
To display all the databases of MySQL with the help of cursor mycursor , command will be
mycursor.execute("SHOW DATABASES")
mycursor.execute("DESC DATABASES")
mycursor.executes("SHOW DATABASES")
mycursor.execute("SHOW ALL DATABASES")
After inserting the data we need to issue
rollback
set autocommit
mycur.commit(1)
mycur.commit()
Which connector is used to connect the MySQL with Python?
mysql.connector
pysql
MyMySQL
Mysql.pymysql
What is the name of host for signing into a database of MySQL?
Local
Myhost
local host
localhost
To open a connection with MySQl we use following library function of imported library:
connectme
connect
Con.connector
None of these
State True or False: Role of execute() is to execute the MySQL queries which pertain to a database or table.
True
False
Which software is used for coding the Python language?
Idea
IDLE
python Script
Connector
Which command is used for counting the number of rows in a database?
row
rowcount
count
row_count
Name the method which is used for displaying only one resultset.
fetchmany
fetchno
fetchall
fetchone
To execute all the rows from the result set, which method is used?
fetchmany
fetchno
fetchall
fetchone
The command used for modifying the records is:
update
modify
both
none of these
Pandas deals with following data structures
Series
Series and Data Frames
Series, DataFrames and Panel
None of Above
Best way to import the pandas module in your program ?
1.import pandas
2.import pandas as pd
3.from pandas import *
4.All of the above
DataFrame in pandas is
1. dimensional array
2. dimensional array
3.dimensional array
4.None of the above
Which of the following object you get after reading CSV file?
a) DataFrame
b) Character Vector
c) Panel
d) All of the mentioned
Which of the following library is similar to Pandas?
a) NumPy
b) RPy
c) SciPy
d) None of the mentioned
Which is not a feature of series
Homogeneous data
Immutable size
Mutable data
Multiple rows
Series can be created from
Array
Dictionary
Scaler value
All of them
Series can be created from
Array
Dictionary
Scaler value
All of them
Full form of CSV file is
Comma Separated Vault
Comma Separated Value
Common Separated Value
Common System Value
Not a function of Dataframe
Head()
Tail()
loc()
multi()
Which function from the options given below can read the dataset from a large text file?
read_json
read_pickle
read_hdf
read_csv
