Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question 1 (1 point) The following code will display \'yes + no\' : mystr = \'ye

ID: 3703152 • Letter: Q

Question

Question 1 (1 point)

The following code will display 'yes + no':
mystr = 'yes'
yourstr = 'no'
mystr += yourstr
print(mystr)

Question 1 options:

Save

Question 2 (1 point)

The index -1 identifies the last character of a string.

Question 2 options:

Save

Question 3 (1 point)

What is the first negative index in a list?

Question 3 options:

A)

B)

C)

D)

Save

Question 4 (1 point)

Which list will be referenced by the variable number after the following code is executed?
number = range(0, 9, 2)

Question 4 options:

A)

B)

C)

D)

Save

Question 5 (1 point)

What will be assigned to the variable s_string after the following code executes?
special = '1357 Country Ln.'
s_string = special[ :4]

Question 5 options:

A)

B)

C)

D)

Save

Question 6 (1 point)

Which of the following would you use if an element is to be removed from a specific index?

Question 6 options:

A)

B)

C)

D)

Save

Question 7 (1 point)

When working with multiple sets of data, one would typically use a(n)

Question 7 options:

A)

B)

C)

D)

Save

Question 8 (1 point)

What is an advantage of using a tuple rather than a list?

Question 8 options:

A)

B)

C)

D)

Save

Question 9 (1 point)

What will display after the following code executes?
password = 'ILOVEPYTHON'
if password.isalpha():
print('Invalid, must contain one number.')
elif password.isdigit():
print('Invalid, must have one non-numeric character.')
elif password.isupper():
print('Invalid, cannot be all uppercase characters.')
else:
print('Your password is secure!')

Question 9 options:

A)

B)

C)

D)

Save

Question 10 (1 point)

What list will be referenced by the variable list_strip after the following code executes?
my_string = '03/07/2018'
list_strip = my_string.split('/')

Question 10 options:

A)

B)

C)

D)

Save

Question 11 (1 point)

Which method can be used to convert a list to a tuple?

Question 11 options:

A)

B)

C)

D)

Save

Question 12 (1 point)

The sort method rearranges the elements of a list so they are in ascending or descending order.

Question 12 options:

Save

Question 13 (1 point)

Which method would you use to determine whether a certain substring is the suffix of a string?

Question 13 options:

A)

B)

C)

D)

Save

Question 14 (1 point)

Invalid indexes do not cause slicing expressions to raise an exception.

Question 14 options:

Save

Question 15 (1 point)

The index -1 identifies the last element in a list.

Question 15 options:

Save

Question 16 (1 point)

What is the first negative index in a string?

Question 16 options:

A)

B)

C)

D)

Save

Question 17 (1 point)

To calculate the average of the numeric values in a list, the first step is to get the total of values in the list.

Question 17 options:

Save

Question 18 (1 point)

Lists are dynamic data structures such that items may be added to them or removed from them.

Question 18 options:

Save

Question 19 (1 point)

Which method can be used to place an item at a specific index in a list?

Question 19 options:

A)

B)

C)

D)

Save

Question 20 (1 point)

If a whole paragraph is included in a single string, the split() method can be used to obtain a list of the sentences in the paragraph.

Question 20 options:

Save

Question 21 (1 point)

What will be displayed after the following code executes?
mystr = 'yes'
yourstr = 'no'
mystr += yourstr * 2
print(mystr)

Question 21 options:

A)

B)

C)

D)

Save

Question 22 (1 point)

Arrays, which are allowed by most other programming languages, have more capabilities than Python list structures.

Question 22 options:

Save

Question 23 (1 point)

Which method or operator can be used to concatenate lists?

Question 23 options:

A)

B)

C)

D)

Save

Question 24 (1 point)

Indexing works with both strings and lists.

Question 24 options:

Save

Question 25 (1 point)

What will be the value of the variable string after the following code executes?
string = 'Hello'
string += ' world!'

Question 25 options:

A)

B)

C)

D)

Save

Question 26 (1 point)

In slicing, if the end index specifies a position beyond the end of the string, Python will use the length of the string instead.

Question 26 options:

Save

Question 27 (1 point)

Indexing of a string starts at 1 so the index of the first character is 1, the index of the second character is 2, and so forth.

Question 27 options:

Save

Question 28 (1 point)

When accessing each character in a string, such as for copying purposes, you would typically use a while loop.

Question 28 options:

Save

Question 29 (1 point)

What will be the value of the variable list after the following code executes?
list = [1, 2]
list = list * 3

Question 29 options:

A)

B)

C)

D)

Save

Question 30 (1 point)

If the start index is ________ the end index, the slicing expression will return an empty string.

Question 30 options:

A)

B)

C)

D)

True False

Explanation / Answer

PLease note as per the chegg guidelines i can provide you first four answer..please make a seprate post for other answers..

Answers are highlighted in bold.

================================================================

The following code will display 'yes + no':
mystr = 'yes'
yourstr = 'no'
mystr += yourstr
print(mystr)

Question 1 options:

Save

Question 2 (1 point)

The index -1 identifies the last character of a string.

Question 2 options:

Save

Question 3 (1 point)

What is the first negative index in a list?

Question 3 options:

A)

B)

C)

D)

Save

Question 4 (1 point)

Which list will be referenced by the variable number after the following code is executed?
number = range(0, 9, 2)

Question 4 options:

A)

B)

C)

D)

===============================================================

KIndly Check and Verify Thanks..!!

True False                  //correct answe is yesno