Which of the following statements is false?

a. The following code deletes only the first three elements of numbers by as-signing an empty list to the three-element slice:
numbers[0:3] = []
b. The following code assigns a list’s elements to a slice of every other element of numbers:
numbers = [2, 3, 5, 7, 11, 13, 17, 19]
numbers[2:2:2] = [100, 100, 100, 100]
c. The following code deletes all the elements in numbers, leaving the existing list empty:
numbers[:] = []
d. When you assign a new object to a variable the original object will be garbage collected if no other variables refer to it.


b. The following code assigns a list’s elements to a slice of every other element of numbers:
numbers = [2, 3, 5, 7, 11, 13, 17, 19]
numbers[2:2:2] = [100, 100, 100, 100]

Computer Science & Information Technology

You might also like to view...

If Americans are objects of the same class, which of the following attributes would most likely be represented by a static variable of that class?

a. Age. b. The President. c. Place of birth. d. Favorite food.

Computer Science & Information Technology

Answer the following statements true (T) or false (F)

1. Streams may be passed to a function. 2. You may use a read (extraction) as a boolean expression in an if or while statement. 3. Using directives can be placed either directly after the include directives, or at the beginning of each function definition. 4. '\n' is two characters. 5. Data that is sent to an output stream representing a file will be immediately saved to disk.

Computer Science & Information Technology

__________ provides a general purpose record I/O capability and maintains basic data about files.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

IBM initially contracted with ________ to create an operating system for use on their first personal computers

A) Microsoft B) Apple C) Palm D) SUN

Computer Science & Information Technology