Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The set of modules that are included in the default installation of python are k

ID: 3874853 • Letter: T

Question

The set of modules that are included in the default installation of python are known as the:

Select one:

a. Standard Library

b. API (Application Programming Interface)

c. Module Library

d. Python Library

----------------------------------------------------------------------------------

Question 2

Variables that are defined inside of a module are called what?

Select one:

a. Attributes

b. Local Variables

c. Methods

d. Keywords

---------------------------------------------------------------------------

Question 3

Creating a python script file with a .py extension on the filename and placing it in the appropriate directory is all that is required to create a module?

Select one:

True

False

--------------------------------------------------------------------

Question 4

In the following Python statement, what do we call the portion of the statement before the dot ('string.')?

string.capitalize('maryland')

Select one:

a. Module

b. Method

c. Function name

d. Attribute

------------------------------------------

Question 5

In the following segment of code what do we call the portion of the statement that follows the dot (capitalize)?

string.capitalize('maryland')

Select one:

a. Module

b. Method

c. Attribute

d. Function name

------------------------------------------

Question 6

What will the contents of mylist be after the following code has been executed?

>>> mylist = [1, 4, 2, 3]

>>> mylist.append(5)

Select one:

a. [1, 4, 2, 3, 5]

b. [5, 1, 4, 2, 3]

c. [null]

d. [1, 4, 2, 3]

------------------------------------------

Question 7

What will the following code segment do?

infile.readlines()

Select one:

a. Read all remaining lines in a file

b. Read the next consecutive line from a file

c. Print the contents of the file

d. Print the first line in the file

-------------------------------------------

Question 8

Memory that can maintain its state without power is know as.

Select one:

a. Non volatile memory

b. Flash drives

c. Random access memory (RAM)

d. Disk drive storage

---------------------------------------

Question 9

Which of the following is NOT a valid mode that can be used to open a file when using the 'open' statement?

Select one:

a. r (read)

b. w (write)

c. a (append)

d. x (eXecute)

--------------------------------

Question 10

The dot operator (.) permits access to attributes and functions of a module (or attributes and methods of a class or instance).

Select one:

True

False

-----------------------------

Question 11

Dictionaries are mutable.

Select one:

True

False

------------------------------

Question 12

Pickling is a way to _________________

Select one:

a. write data to a file

b. preserve data structure

c. import standard functions

d. move self created functions to a library

-------------------------------------------

Question 13

Question text

Exceptions allow the programmer to _________________

Select one:

a. override all runtime errors

b. write code to handle runtime errors

c. ignore syntax errors

d. load data from a file

------------------------------------

Question 14

The Motorola Power PC 601 microprocessor contained 2.8 million transistors.

Select one:

True

False

--------------------------------

Question 15

The first patent for a microprocessor is attributed to Gary Boone and MIchael Cochran of Texas Instruments.

Select one:

True

False

Explanation / Answer

1 Ans:a)Standard Library

2 Ans:a)Attributes

3 Ans:False

4 Ans:d)Attributes

5.Ans:b)Method

6 Ans:a) [ 1,4,2,3,5]

7 Ans:a)Reads all remaining lines in a file.

8 Ans:a)Non-volatile Memory

9 Ans:d)x(eXecute)

10 Ans:True

11 Ans:True

12 Ans:c)Import Standard Functions

13 Ans:b)Write code to handle runtime errors.

14 Ans:True

15 Ans:True

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote