Which list will be referenced by the variable number after the execution of the following code: number=range(0,9,2)
The primary difference between a list and a tuple is that ______
Once a tuple is created, it cannot be changed.
What will be assigned to s_string after the execution of the following code? special = '1357 country ln.' s_string = special[-3. ]
'ln.'
What is the number of the first index in a list dictionary
Dictionary is not indexed by number
What is the special name given to the method that returns a string containing the object's state?
__str__
What is the first negative index in a list?
-1
What are the valid indexes for the string 'New York'?
0 through 7
what will be assigned to the string variable pattern after the execution of the following code? I = 3 Pattern = 'Z' * (5*1)
'ZZZZZZZZZZZZZZZ'
You created the following dictionary relationships = {'Jimmy':'Brother'}. Executing relationships['Jimmy'] will give you an error. What is the reason? Relationships['Jimmy']
String comparisons are case sensitive so 'Jimmy' does not equal 'Jimmy'.
Which method is automatically executed when an instance of the class is created in memory?
__init__
What would be the value of the variable after the execution of the following code? list = [1, 2] list = list * 3
[1,2,1,2,1,2]
what will be assigned to s_string after the execution of the following code? special = '1357 country ln.' s_string = special[ :4]
'1357'
What is the valuable of the variable string after the execution of the following code? string = 'Hello' string += 'World'
'Hello World'
Which method would you use to return the value associated with a specified key and remove that key-value pair from the dictionary?
pop
When a method is called, what does python make to reference the specific object on which the method is supposed to operate?
What would be the value of the variable list after the execution of the following code? list = [1, 2, 3, 4] list[3] = 10
[1, 2, 3, 10]
what will be assigned to s_string after the execution of the following code? special = '1357 country ln.' s_string = special[:4 ]
'country ln.'
In a dictionary, you must use a(n) ______ to locate a specific value.
key
What does the acronym uml stand for?
Unified Modeling Language
what type of programming contains class definitions
object-oriented
What would be the value of the variable list2 after the execution of the following code? list1 = [1, 2, 3] list2 = [] for element in list1 list2.append(element) list1 = [4, 5, 6]
[1, 2, 3]
what will be assigned to the string variable even after the execution of the following code? special = '01234567890' even = special[0:10:2]
'02468'
What is the correct structure for creating a dictionary of month names to be accessed by month numbers?
What type of method provides a safe way for code outside a class to retrieve the values of attributes, without exposing the attributes in a way that they could be changed by the code outside method
accessor
what are the procedures that an object performs called
methods