Certified Professional in Python Programming 1 v1.0

Page:    1 / 6   
Exam contains 80 questions

Select the true statements about the connection-oriented and connectionless types of communication. (Choose two.)

  • A. In the context of TCP/IP networks, the communication side that initiates a connection is called the client, whereas the side that answers the client is called the server
  • B. Connectionless communications are usually built on top of TCP
  • C. Using walkie-talkies is an example of a connection-oriented communication
  • D. A phone call is an example of a connection-oriented communication


Answer : AD

Select the true statements about sockets. (Choose two.)

  • A. A socket is a connection point that enables a two-way communication between programs running in a network
  • B. A socket is always the secure means by which computers on a network can safely communicate, without the risk of exposure to an attack
  • C. A socket is a connection point that enables a one-way communication only between remote processes
  • D. A socket can be used to establish a communication endpoint for processes running on the same or different machines


Answer : AD

Select the true statement about the socket.gaierror exception.

  • A. It is raised when a timeout occurs on a socket
  • B. It is raised when a system function returns a system-related error.
  • C. It is raised when an address-related error caused by the repr() function occurs.
  • D. It is raised when an address-related error caused by the getaddrinfo() and getnameinfo() functions occurs


Answer : D

Select the true statements about the json.dumps() function. (Choose two.)

  • A. It returns a JSON string.
  • B. It returns a Python entity.
  • C. It takes a JSON string as its argument.
  • D. It takes Python data as its argument.


Answer : AD

What is ElementTree?

  • A. A Python built-in module that contains functions used for creating HTML files.
  • B. A Python library that contains an API used for parsing and manipulating JSON files.
  • C. A Python library that contains functions and tools used for manipulating text files in GUI Programming.
  • D. A Python built-in module that contains functions used for parsing and creating XML data.


Answer : D

In the JSON processing context, the term serialization:

  • A. names a process in which Python data is turned into a JSON string
  • B. names a process in which a JSON string is turned into Python data
  • C. refers to nothing, because there is no such thing as JSON serialization
  • D. names a process in which a JSON string is remodeled and transformed into a new JSON string


Answer : A

Select the true statements about the following invocation:
r = requests.get('http://localhost:3000')
(Choose two.)

  • A. It addresses a service deployed at localhost (the host where the code is run).
  • B. It addresses a service whose timeout is set to 3000 ms.
  • C. It addresses a service located at the following address: local host.com.
  • D. It addresses a service listening at port 3000.


Answer : AD

A socket object is usually created by which one of the following invocations?

  • A. socket.socket(socket_domain, socket_type)
  • B. socket = socket.socket(socket_number)
  • C. socket = socket.socket(socket_domain, socket_type, server_address)
  • D. socket = socket.socket(server_address)


Answer : A

Select the true statements about the sqlite3 module. (Choose two.)

  • A. The fetchall method returns None when no rows are available.
  • B. The execute method allows you to perform several queries at once.
  • C. The execute method is provided by the Cursor class
  • D. The fetchone method returns None when no rows are available


Answer : CD

Which of the following constants will be used if you do not define the quoting argument in the writer method provided by the csv module?

  • A. csv.QUOTE_MINIMAL
  • B. csv.QUOTE_NONE
  • C. sv.QUOTE_ALL
  • D. csv.QUOTE_NONNUMERIC


Answer : A

Which one of the following methods allows you to debug an XML tree in the xml.etree.ElementTree module?

  • A. debug
  • B. dump
  • C. log
  • D. parse


Answer : B

Select the true statements about the sqlite3 module. (Choose two.)

  • A. The sqlite3 module provides an interface compliant with the DB-API 2.0
  • B. The special name memory is used to create a database in RAM
  • C. The sqlite3 module does not support transactions.
  • D. The fetchall method returns an empty list when no rows are available.


Answer : AD

What is the result of the following code?

  • A. Nothing will be displayed
  • B. Loading data...
  • C. Debugging mode has been enabled
  • D. Debugging mode has been enabled
    Loading data...


Answer : A

What will be the content of the colors csv file when you run the following code?

  • A.
  • B.
  • C.
  • D. An exception will be raised


Answer : D

Which of the following methods allow you to load a configuration using ConfigParser? (Choose two.)

  • A. read
  • B. read_dict
  • C. read_conf
  • D. read_str


Answer : AB

Page:    1 / 6   
Exam contains 80 questions

Talk to us!


Have any questions or issues ? Please dont hesitate to contact us

Certlibrary.com is owned by MBS Tech Limited: Room 1905 Nam Wo Hong Building, 148 Wing Lok Street, Sheung Wan, Hong Kong. Company registration number: 2310926
Certlibrary doesn't offer Real Microsoft Exam Questions. Certlibrary Materials do not contain actual questions and answers from Cisco's Certification Exams.
CFA Institute does not endorse, promote or warrant the accuracy or quality of Certlibrary. CFA® and Chartered Financial Analyst® are registered trademarks owned by CFA Institute.
Terms & Conditions | Privacy Policy