Exam 8: More About Strings
Exam 1: Introduction to Computers and Programming36 Questions
Exam 2: Input, Processing, and Output35 Questions
Exam 3: Decision Structures and Boolean Logic35 Questions
Exam 4: Repetition Structures34 Questions
Exam 5: Functions and Modules69 Questions
Exam 6: Files and Exceptions34 Questions
Exam 7: Lists and Tuples35 Questions
Exam 8: More About Strings35 Questions
Exam 9: Dictionaries and Sets35 Questions
Exam 10: Classes and Object Oriented Programming35 Questions
Exam 11: Inheritance35 Questions
Exam 12: Recursion35 Questions
Exam 13: GUI Programming35 Questions
Select questions type
If the start index is _____ the end index, the slicing expression will return an empty string.
(Multiple Choice)
4.9/5
(77)
A(n) _______________ exception will occur if you try to use an index that is out of range for a particular string.
(Short Answer)
4.8/5
(82)
What is the value of the variable string after the execution of the following code?
String = 'Hello'
String += ' world'
(Multiple Choice)
4.7/5
(94)
The _______________ method returns true if the string contains only numeric digits.
(Short Answer)
4.9/5
(88)
When accessing each character in a string, such as for copying purposes, you would typically use a while loop.
(True/False)
4.9/5
(79)
What will be assigned to the string variable pattern after the execution of the following code?
I = 3
Pattern = 'z' * (5*i)
(Multiple Choice)
4.8/5
(95)
The _______________ operator can be used to determine whether one string is contained in another string.
(Short Answer)
4.8/5
(87)
An expression of the form string[i] = 'i' is a valid expression.
(True/False)
4.8/5
(81)
The third number in string slicing brackets represents the _______________ value.
(Short Answer)
4.8/5
(73)
Invalid indexes do not cause slicing expressions to raise an exception.
(True/False)
4.7/5
(82)
What is the value of the variable string after the execution of the following code?
String = 'abcd'
String.upper()
(Multiple Choice)
4.8/5
(89)
A(n) _______________ is a span of characters that are taken from within a string.
(Short Answer)
4.9/5
(82)
What will be assigned to s_string after the execution of the following code?
Special = '1357 Country Ln.'
S_string = special[-3: ]
(Multiple Choice)
4.9/5
(90)
Showing 21 - 35 of 35
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)