Exam 9: More About Strings
Exam 1: Introduction to Computers and Programming35 Questions
Exam 2: Input, Processing, and Output35 Questions
Exam 3: Simple functions34 Questions
Exam 4: Decision Structures and Boolean Logic35 Questions
Exam 5: Repetition Structures35 Questions
Exam 6: Value-Returning functions and Modules35 Questions
Exam 7: files and Exceptions35 Questions
Exam 8: Lists and Tuples35 Questions
Exam 9: More About Strings35 Questions
Exam 10: Dictionaries and Sets35 Questions
Exam 11: Classes and Object-Oriented Programming35 Questions
Exam 12: Inheritance35 Questions
Exam 13: Recursion35 Questions
Exam 14: GUI Programming35 Questions
Select questions type
Which method would you use to determine whether a substring is the suffix of a string?
(Multiple Choice)
4.8/5
(39)
A(n) _______________ is a span of characters that are taken from within a string.
(Short Answer)
4.8/5
(29)
What is the value of the variable string after the execution of the following code? string = 'Hello'
String += ' world'
(Multiple Choice)
4.9/5
(24)
If the start index is _____ the end index, the slicing expression will return an empty string.
(Multiple Choice)
4.8/5
(35)
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.
(True/False)
4.9/5
(34)
Which of the following string methods can be used to determine if a string contains only '\n' characters?
(Multiple Choice)
4.8/5
(41)
If the + operator is used on strings, it produces a string that is the combination of the two strings used as its operands.
(True/False)
4.7/5
(34)
A(n) _______________ exception will occur if you try to use an index that is out of range for a particular string.
(Short Answer)
4.9/5
(40)
Each character in a string has a(n) _______________ which specifies its position in the string.
(Short Answer)
4.8/5
(38)
Strings are _______________, which means that once a string is created, it cannot be changed.
(Short Answer)
4.9/5
(38)
What is the value of the variable string after the execution of the following code? string = 'abcd'
String.upper()
(Multiple Choice)
4.8/5
(32)
When the operand on the left side of the * symbol is a string and the operand on the right side is an integer, it becomes the _______________ operator.
(Short Answer)
4.8/5
(33)
The _______________ method returnst if the string contains only numeric digits.
(Short Answer)
4.8/5
(39)
Which list will be referenced by the variable list_strip after the execution of the following code? list_string = '03/07/2008'
List_strip = list_string.split('/')
(Multiple Choice)
4.7/5
(33)
Showing 21 - 35 of 35
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)