CS1400 Unit 5 Reviewing the Basics Quiz

¡Supera tus tareas y exámenes ahora con Quizwiz!

strings and tuples

Which of the following are immutable data structures?

[10, 15, 20, 30]

The variable data refers to the list [10, 20, 30]. After the statement data.insert(1, 15), the original data evaluates to

10, 5, 30]

The variable data refers to the list [10, 20, 30]. After the statement data[1] = 5, data evaluates to

[10, 20, 30, 40, 50]

The variable data refers to the list [10, 20, 30]. The expression data + [40, 50] evaluates to

1

The variable data refers to the list [10, 20, 30]. The expression data.index(20) evaluates to

[20, 30]

The variable data refers to the list [10, 20, 30]. The expression data[1:3] evaluates to

20

The variable data refers to the list [10, 20, 30]. The expression data[1] evaluates to

None

The variable info refers to the dictionary {"name":"Sandy", "age":17}.The expression info.get("hobbies", None) evaluates to

["name", "age"]

The variable info refers to the dictionary {"name":"Sandy", "age":17}.The expression list(info.keys()) evaluates to

pop

The variable info refers to the dictionary {"name":"Sandy", "age":17}.The method to remove an entry from a dictionary is named


Conjuntos de estudio relacionados

GEB1011 FINAL - QUIZZES (CHP 4 + 7)

View Set

Chapter 6 -- Disorders of the Breasts

View Set

Series 66 Chapter 9: Investment Recommendations - Risks and Returns

View Set

Management Study Guide: Effective Teamwork

View Set

AIS Chapter 12: Accounting and Enterprise Software

View Set

40th President of the United States - Ronald Reagan

View Set

Nursing 104 Chapter 34 & 35 Study Guide

View Set