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
The _______________ operator can be used to determine whether one string is contained in another string.
Free
(Short Answer)
4.8/5
(36)
Correct Answer:
in
The _______________ method returns a copy of the string with all alphabetic letters converted to lower case.
Free
(Short Answer)
4.8/5
(32)
Correct Answer:
lower()
If a whole paragraph is included in a single string, the split() method can be used to obtain a list of the sentences included in the paragraph.
Free
(True/False)
4.8/5
(35)
Correct Answer:
True
What will be assigned to the string variable even after the execution of the following code? special = '0123456789'
Even = special[0:10:2]
(Multiple Choice)
5.0/5
(33)
What will be assigned to s_string after the execution of the following code? special = '1357 Country Ln.'
S_string = special[4: ]
(Multiple Choice)
4.8/5
(48)
Which method would you use to determine whether a substring is present in a string?
(Multiple Choice)
4.9/5
(36)
The strip() method returns a copy of the string with all leading whitespace characters removed, but does not remove trailing whitespace characters.
(True/False)
4.8/5
(30)
When accessing each character in a string, such as for copying purposes, you would typically use a while loop.
(True/False)
4.9/5
(43)
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.8/5
(41)
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.9/5
(34)
The third number in string slicing brackets represents the _______________ value.
(Short Answer)
4.8/5
(38)
Invalid indexes do not cause slicing expressions to raise an exception.
(True/False)
4.8/5
(34)
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
(31)
What will be assigned to s_string after the execution of the following code? special = '1357 Country Ln.'
S_string = special[ :4]
(Multiple Choice)
4.8/5
(38)
The _______________ method returns the list of the words in the string.
(Short Answer)
4.8/5
(40)
Showing 1 - 20 of 35
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)