Question: 1. A Strings must contain characters, lists can contain a. Tuples b. Any data type, but elements can be of different data types c. Dictionaries
1. A Strings must contain characters, lists can contain a. Tuples b. Any data type, but elements can be of different data types c. Dictionaries d. Any data type, but all elements must be the same data type. 2. Matching a. List b. Tuple segi - ("dog", 3.14, True, 32) seq2 - ("dog", 3.14, True, 32) Answer questions about the sequence, segl. so all statements evaluate to True: seqi - ["dog", 3.14, 10.4, 1, 32] a. == len (seqi) b. "dog" -- seqll_ == seqi(2) d. == seql(len (seql)-1] 4. Evaluate the expression for this sequence: seql = ["cat", 3.14, 10.4, 1, 32, 19, 6.02e+23), and fill in the blank showing what changed. seqi[3] = seq1[4]/2 + seqi [3] seql = ["cat", 32] 5. Consider these variables (two sequences, and a string): seql = ["dog", 3.14, True, 32] seq2 - ("cat", 2.18, False, 32) strl = "mouse" Which is an illegal operation? a. seql += seg2 b. seql +- stri c. seq3 = seql + seq2 6. Consider the following sequence: seql = ["cat", 3.14, 10.4, 1, 32, 88.8] What is seqi[1:4]? a. ["cat", 3.14, 10.4, 1] c. "cat", 1] b. [3.14, 32] d. (3.14, 10.4, 1]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
