Python Packages and Data Access MCQ

Python Packages and Data Access MCQ

Final Assessment

1.How many components are present in SQLAlchemy?

  1. 2
  2. 5
  3. 3
  4. 1
  5. 4

Answer: 1)2

click here to read more technical question and answers

2.Which of the following identifier is used to identify whitespace around words in regular expressions?

  1. \w
  2. \b
  3. \D
  4. \s
  5. \S

Answer: 1)\w

3.Which of the following package contains permutations?

  1. datetime
  2. sys
  3. collections
  4. shutils
  5. itertools

Answer: 5)itertools

4.Safe pickling is used because, by default, a class or function present in pickle data is imported.

  1. FALSE
  2. TRUE

Answer: 2)TRUE

5.Which of the following analyses only the beginning of a string?

  2. re.findall
  3. re.compile
  4. re.match
  5. None of the options

Answer: 4)re.match

6.If you copy a file from one folder to another with the same file name using shutil, the file will be overwritten.

  1. TRUE
  2. FALSE

Answer: 1)TRUE

7.Which of the following specifies the number of connections in a connection pool?

  1. pool_size
  2. encoding
  3. isolation_level
  4. max_overflow
  5. echo

Answer: 1)pool_size

8.Which of the following is used to load a file?

  1. json.dumps
  2. json.loads
  3. None of the options
  4. json.load

Answer: 4)json.load

9.Which of the following is used to get named entries into a tuple?

  1. deque
  2. counter
  3. OrderedDict
  4. namedtuple
  5. chainmap

Answer: 4)namedtuple

10.In SQLAlchemy Raw SQL, CRUD operations are performed by using?

  1. Raw statements
  2. None of the options
  3. SQL syntax
  4. Python statements

Answer: 2)None of the options

11.Which of the following parameter is not present in datetime.time?

  1. Second
  2. Hour
  3. Microsecond
  4. Millisecond
  5. Minute

Answer: 4)Millisecond

12.Which of the following enables “.” that matches newline?

  1. re.S
  2. re.M
  3. re.I
  4. re.U
  5. re.L

Answer: 1)re.S

13.Which of the following is used to request data from a server?

  1. Cookies
  2. Session objects
  3. Headers
  4. GET
  5. POST

Answer: 4)GET

14.You can overwrite a file despite moving a file from one folder to another.

  1. FALSE
  2. TRUE

Answer: 2)TRUE

15.Which of the following command is used to combine both date and time?

  2. combine
  3. date
  4. datetime.datetime.combine
  5. time

Answer: 4)datetime.datetime.combine

16.Which of the following command is used to change the location of a file from one folder to another?

  1. shutil.copy
  2. shutil.overwrite
  3. None of the options
  4. shutil.move

Answer: 4)shutil.move

17.Which of the following enables to rename a directory?

  1. getcwd
  2. mkdir
  3. rename
  4. rmdir
  5. os.rename

Answer: 5)os.rename

18.Psycopg2 and pg80000 are the drivers for ______________.

  1. MySQL
  2. None of the options
  3. MSSQL
  4. PostgreSQL

Answer: 4)PostgreSQL

19.Which of the following command is used to print error text?

  1. None of the options
  2. sys.stderr
  3. stderr
  4. sys.stdout
  5. sys.argv

Answer: 4)sys.stdout

20.Which of the following is used to pass arguments to a Python file by using command line?

  1. os.mkdir
  2. os.getcwd
  3. sys.argv
  4. sys.stderr
  5. os.rename

Answer: 3)sys.argv

21.Which of the following provides a pipe to access a file directly?

  1. os.error
  2. os.popen
  3. os.close

Answer: 2)os.popen

22.What are the major benefits of using SQLAlchemy?

  1. Simple logic
  2. Cleaner code
  3. All the options
  4. Secure code

Answer: 3)All the options

23.Which of the following is considered an optimized list?

  1. OrderedDict
  2. namedtuple
  3. counter
  4. deque
  5. chainmap

Answer: 4)deque

24.Pickle cannot store class objects.

  1. FALSE
  2. TRUE

Answer: 1)FALSE

25.os.mkdir enables to create a new file.

  1. TRUE
  2. FALSE

Answer: 2)FALSE

26.In SQLAlchemy, performing operations using Raw SQL is easier.

  1. TRUE
  2. FALSE

Answer: 2)FALSE

Click here to read more blogs

SAP S/4HANA Master Data Concepts Questions & Answers
SAP S/4HANA Functional Capabilities 1909 Questions & Answer
SAP S/4HANA Technical Capabilities 1909 Questions & Answers
SAP Implementation S/4HANA Project Management Questions & Answers
SAP S/4 HANA Enterprise Management – Sales Questions Answers
SAP S/4HANA Key Concepts Overview Questions & Answers
SAP S/4HANA Enterprise Structure Questions & Answer
SAP S/4HANA Reporting and Analytics Questions & Answers
SAP S/4HANA Navigation Interview Questions and Answers
SAP S/4HANA Awareness 1909 Questions and Answers

About Author

After years of Technical Work, I feel like an expert when it comes to Develop wordpress website. Check out How to Create a Wordpress Website in 5 Mins, and Earn Money Online Follow me on Facebook for all the latest updates.

Leave a Comment