Question: (20 points, each 2 points) True or False questions: 1) (True/False) List is collection that are ordered, changeable, and allows duplicate members, while tuple is

(20 points, each 2 points) True or False questions:

1) (True/False) List is collection that are ordered, changeable, and allows duplicate members, while tuple is ordered, unchangeable, and also allows duplicate members.

Answer:

2) (True/False) Slice operations that modify a sequence work identically for list, tuple and strings.

Answer:

3) (True/False) Even though a tuple is immutable, its elements can be mutable objects, such as lists.

Answer:

4) (True/False) When you pass a list (a mutable object) to a function, the function receives a reference to the original list object, and can use that reference to modify the original lists contents

Answer:

5) (True/False) Not all sequences provide a sort() method. Immutable sequences like tuples and strings do not provide a sort method. However, you can sort any sequence like strings, tuples, lists, without modifying it by using build-in function sorted(), which returns a new list containing the sorted elements of its argument sequences.

Answer:

6) (True/False) All objects in Python has its own id, its guaranteed to be unique and remains constant for this object during its lifetime

Answer:

7) (True/False) myTuple = (1) myTuple is a Tuple

Answer:

8) (True/False) Removing individual tuple elements is not possible. But you can put together a new tuple with the undesired elements discarded

Answer:

9) (True/False) Lists and tuples can hold values of any type, strings are sequences of characters.

Answer:

10) (True/False) myTuple = (1) creates a tuple (1).

Answer:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!