Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions