Chapter 8 - More About Strings

Ace your homework & exams now with Quizwiz!

This operator determines whether one string is contained inside another string. A. in B. == C. contains D. is_in

A. in

This string method returns a copy of the string with all leading whitespace characters removed. A. rstrip B. lstrip C. remove D. strip_leading

B. lstrip

This string method returns true if a string contains only numeric digits and is at least one character in length. A. the isnumber method B. the isdigit method C. the digit method D. the numeric method

B. the isdigit method

This string method returns a copy of a string with all the alphabetic letters converted to uppercase. A. to_uppercase() B. upper() C. uppercase() D. case_upper()

B. upper()

This function returns the length of a string. A. lengthof B. length C. len D. size

C. len

This is the first index in a string. A. The size of the string minus 1. B. -1 C. 1 D. 0

D. 0

The statement print('QWERTY'*2) will print _________ on the screen. A. ERTY B. QWERTY C. QW D. QWERTYQWERTY

D. QWERTYQWERTY

In Python, strings are mutable. T/F

False

The in operator can be used to determine whether one string is not contained in another string. T/F

False

The method lower() returns a string with all the characters converted to lowercase. T/F

True


Related study sets

PRAXIS Elementary Education: Multiple Subjects Mathmatics (5003) Practice Test Questions (form 3)

View Set

Unit 4 - Communications With Customers and Prospects

View Set

Chapter 6 - Values, Ethics and Advocacy

View Set

ATI RN Fundamentals Online Practice 2019 B w. NGN

View Set

Earth A Unit 2 Test Review - Where is Earth?

View Set

Chapter 11: Managing Labor Relations

View Set

Combo with "Completing the Sentence Unit 13 Vocab" and 1 other

View Set

4 - Enhanced Entity..Relationship and UML Modeling

View Set