Exam 8: More About Strings
Exam 1: Introduction to Computers and Programming39 Questions
Exam 2: Input, Processing, and Output40 Questions
Exam 3: Decision Structures and Boolean Logic40 Questions
Exam 4: Repetition Structures41 Questions
Exam 5: Functions66 Questions
Exam 6: Files and Exceptions40 Questions
Exam 7: Lists and Tuples40 Questions
Exam 8: More About Strings37 Questions
Exam 9: Dictionaries and Sets39 Questions
Exam 10: Classes and Object-Oriented Programming38 Questions
Exam 11: Inheritance36 Questions
Exam 12: Recursion35 Questions
Exam 13: Gui Programming42 Questions
Select questions type
A(n)__________ is a span of characters that are taken from within a string.
(Short Answer)
4.8/5
(77)
You cannot use a for loop to iterate over the characters in a string.
(True/False)
4.8/5
(87)
The __________ operator can be used to determine whether one string is contained in another string.
(Short Answer)
4.8/5
(84)
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('/')
(Multiple Choice)
4.9/5
(82)
If the + operator is used on strings,it produces a string that is a combination of the two strings used as its operands.
(True/False)
4.8/5
(87)
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.
(True/False)
4.7/5
(79)
In slicing,if the end index specifies a position beyond the end of the string,Python will use the length of the string instead.
(True/False)
4.7/5
(79)
If the start index is __________ the end index,the slicing expression will return an empty string.
(Multiple Choice)
5.0/5
(92)
Which method would you use to determine whether a certain substring is the suffix of a string?
(Multiple Choice)
4.8/5
(78)
Which method would you use to determine whether a certain substring is present in a string?
(Multiple Choice)
4.8/5
(85)
What will be assigned to the variable some_nums after the following code executes?
Special = '0123456789'
Some_nums = special[0:10:2]
(Multiple Choice)
4.8/5
(76)
The following code will display 'yes + no':
mystr = 'yes'
yourstr = 'no'
mystr += yourstr
print(mystr)
(True/False)
4.9/5
(87)
When the operand on the left side of the * symbol is a string and the operand on the right side is an integer,the * becomes the ___________ operator.
(Short Answer)
4.9/5
(67)
What will be assigned to the variable s_string after the following code executes?
Special = '1357 Country Ln.'
S_string = special[4:]
(Multiple Choice)
4.8/5
(82)
Showing 21 - 37 of 37
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)